projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a10c2a
)
block: Fix bio_copy_data()
author
Kent Overstreet
<
[email protected]
>
Tue, 24 Sep 2013 06:17:26 +0000
(23:17 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 24 Sep 2013 21:41:42 +0000
(14:41 -0700)
The memcpy() in bio_copy_data() was using the wrong offset vars, leading
to data corruption in weird unusual setups.
Signed-off-by: Kent Overstreet <
[email protected]
>
Cc: Jens Axboe <
[email protected]
>
Cc: linux-stable <
[email protected]
> # >= v3.9
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/bio.c
patch
|
blob
|
history
diff --git
a/fs/bio.c
b/fs/bio.c
index b3b20ed9510e5ccc285195cce7aa7e3f524ed063..ea5035da4d9a0cd9fd6f5f657bb01272c63175c3 100644
(file)
--- a/
fs/bio.c
+++ b/
fs/bio.c
@@
-917,8
+917,8
@@
void bio_copy_data(struct bio *dst, struct bio *src)
src_p = kmap_atomic(src_bv->bv_page);
dst_p = kmap_atomic(dst_bv->bv_page);
- memcpy(dst_p + dst_
bv->bv_
offset,
- src_p + src_
bv->bv_
offset,
+ memcpy(dst_p + dst_offset,
+ src_p + src_offset,
bytes);
kunmap_atomic(dst_p);