]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md/raid10: fix deadlock with unaligned read during resync
authorNeilBrown <neilb@suse.de>
Sat, 7 Aug 2010 11:17:00 +0000 (21:17 +1000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Aug 2010 20:27:20 +0000 (13:27 -0700)
commitf835fa449018b2ee7a09f846cac415240708d3e0
treeda822b4f23dd358c8ed9b840a7f2d883d97c5eb3
parentfc20cc6e266d46f389da4e4132aade253cc3adb4
md/raid10: fix deadlock with unaligned read during resync

commit 51e9ac77035a3dfcb6fc0a88a0d80b6f99b5edb1 upstream.

If the 'bio_split' path in raid10-read is used while
resync/recovery is happening it is possible to deadlock.
Fix this be elevating ->nr_waiting for the duration of both
parts of the split request.

This fixes a bug that has been present since 2.6.22
but has only started manifesting recently for unknown reasons.
It is suitable for and -stable since then.

Reported-by: Justin Bronder <jsbronder@gentoo.org>
Tested-by: Justin Bronder <jsbronder@gentoo.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/raid10.c