md/raid1: intialise start_next_window for READ case to avoid hang
authorNeilBrown <neilb@suse.de>
Mon, 22 Sep 2014 00:06:23 +0000 (10:06 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Oct 2014 21:52:23 +0000 (14:52 -0700)
commit2d433af81cb56603d8541dfe118bb02c69570d6c
tree0c3f83fbd9c39cbcdd276b6c5ebafa6b1cd05c27
parenta2e286965a1ddf3ae1bdd89ad23d6aad3eb58a00
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
   conf->current_window_requests
which can cause raise_barrier() to block forever.

Fixes: 79ef3a8aa1cb1523cc231c9a90a278333c21f761
Reported-by: Brassow Jonathan <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/raid1.c