[3.13.y.z extended stable] Patch "md/raid1: intialise start_next_window for READ case to avoid hang" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Thu Oct 9 20:51:43 UTC 2014

This is a note to let you know that I have just added a patch titled

    md/raid1: intialise start_next_window for READ case to avoid hang

to the linux-3.13.y-queue branch of the 3.13.y.z extended stable tree 
which can be found at:


This patch is scheduled to be released in version

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.13.y.z tree, see



>From 63853e9a5f849322bf8aba452a6f14337af7a671 Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb at suse.de>
Date: Mon, 22 Sep 2014 10:06:23 +1000
Subject: md/raid1: intialise start_next_window for READ case to avoid hang

commit f0cc9a057151892b885be21a1d19b0185568281d upstream.

r1_bio->start_next_window is not initialised in the READ
case, so allow_barrier may incorrectly decrement
which can cause raise_barrier() to block forever.

Fixes: 79ef3a8aa1cb1523cc231c9a90a278333c21f761
Reported-by: Brassow Jonathan <jbrassow at redhat.com>
Signed-off-by: NeilBrown <neilb at suse.de>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
 drivers/md/raid1.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index f4d5e52..b806da4 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1187,6 +1187,7 @@ read_again:
 				   atomic_read(&bitmap->behind_writes) == 0);
 		r1_bio->read_disk = rdisk;
+		r1_bio->start_next_window = 0;

 		read_bio = bio_clone_mddev(bio, GFP_NOIO, mddev);
 		bio_trim(read_bio, r1_bio->sector - bio->bi_sector,

More information about the kernel-team mailing list