https://github.com/torvalds/linux
Revision 6c0544e255dd6582a9899572e120fb55d9f672a4 authored by majianpeng on 12 June 2012, 00:31:10 UTC, committed by NeilBrown on 03 July 2012, 02:09:57 UTC
In chunk_aligned_read() we are adding data_offset before calling
is_badblock.  But is_badblock also adds data_offset, so that is bad.

So move the addition of data_offset to after the call to
is_badblock.

This bug was introduced by commit 31c176ecdf3563140e639
     md/raid5: avoid reading from known bad blocks.
which first appeared in 3.0.  So that patch is suitable for any
-stable kernel from 3.0.y onwards.  However it will need minor
revision for most of those (as the comment didn't appear until
recently).

Cc: stable@vger.kernel.org
Signed-off-by: majianpeng <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
1 parent 5cfb22a
History
Tip revision: 6c0544e255dd6582a9899572e120fb55d9f672a4 authored by majianpeng on 12 June 2012, 00:31:10 UTC
md/raid5: Do not add data_offset before call to is_badblock
Tip revision: 6c0544e
File Mode Size
apparmor
integrity
keys
selinux
smack
tomoyo
yama
Kconfig -rw-r--r-- 5.7 KB
Makefile -rw-r--r-- 1.0 KB
capability.c -rw-r--r-- 23.3 KB
commoncap.c -rw-r--r-- 27.9 KB
device_cgroup.c -rw-r--r-- 11.3 KB
inode.c -rw-r--r-- 6.7 KB
lsm_audit.c -rw-r--r-- 9.3 KB
min_addr.c -rw-r--r-- 1.3 KB
security.c -rw-r--r-- 33.9 KB

back to top