RAID5: check_reshape() shouldn't call mddev_suspend
authorShaohua Li <shli@fb.com>
Thu, 25 Feb 2016 01:38:28 +0000 (17:38 -0800)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 18 Apr 2016 12:50:41 +0000 (08:50 -0400)
commit503f8305ab1b82d8788a2f161e7c52c0c0f6aeac
tree579af13d6f803407abe40862735ac942dfb829b3
parent5255a738ee6ecc0e479728efe5668efd64901197
RAID5: check_reshape() shouldn't call mddev_suspend

[ Upstream commit 27a353c026a879a1001e5eac4bda75b16262c44a ]

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.")

Cc: stable@vger.kernel.org (v4.1+)
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: Sasha Levin <sasha.levin@oracle.com>
drivers/md/raid5.c
drivers/md/raid5.h