RAID5: check_reshape() shouldn't call mddev_suspend
authorShaohua Li <shli@fb.com>
Thu, 25 Feb 2016 01:38:28 +0000 (17:38 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Apr 2016 16:08:57 +0000 (09:08 -0700)
commit8568767fe1d63fbbdeacf2f69da6f84ad277d4f7
tree630aeb7c27e18aa69a40bc1b5e10c9a07cbf1572
parentfad8b6fc040bf1d9807ee0e3358275d06b14cf96
RAID5: check_reshape() shouldn't call mddev_suspend

commit 27a353c026a879a1001e5eac4bda75b16262c44a upstream.

check_reshape() is called from raid5d thread. raid5d thread shouldn't
call mddev_suspend(), because mddev_suspend() waits for all IO finish
but IO is handled in raid5d thread, we could easily deadlock here.

This issue is introduced by
738a273 ("md/raid5: fix allocation of 'scribble' array.")

Reported-and-tested-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/raid5.c
drivers/md/raid5.h