This is a note to let you know that I've just added the patch titled

    block: Fix bio_copy_data()

to the 3.10-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     block-fix-bio_copy_data.patch
and it can be found in the queue-3.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 2f6cf0de0281d210061ce976f2d42d246adc75bb Mon Sep 17 00:00:00 2001
From: Kent Overstreet <[email protected]>
Date: Mon, 23 Sep 2013 23:17:26 -0700
Subject: block: Fix bio_copy_data()

From: Kent Overstreet <[email protected]>

commit 2f6cf0de0281d210061ce976f2d42d246adc75bb upstream.

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]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 fs/bio.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/fs/bio.c
+++ b/fs/bio.c
@@ -917,8 +917,8 @@ void bio_copy_data(struct bio *dst, stru
                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);


Patches currently in stable-queue which might be from [email protected] are

queue-3.10/block-fix-bio_copy_data.patch
queue-3.10/bcache-fix-a-dumb-journal-discard-bug.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to