From: Pingfan Liu Date: Wed, 15 Feb 2023 11:23:40 +0000 (+0800) Subject: dm: add cond_resched() to dm_wq_work() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0ca44fcef241768fd25ee763b3d203b9852f269b;p=linux.git dm: add cond_resched() to dm_wq_work() Otherwise the while() loop in dm_wq_work() can result in a "dead loop" on systems that have preemption disabled. This is particularly problematic on single cpu systems. Cc: stable@vger.kernel.org Signed-off-by: Pingfan Liu Acked-by: Ming Lei Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 90b64bfc63b01..15b91959e433a 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -2570,6 +2570,7 @@ static void dm_wq_work(struct work_struct *work) break; submit_bio_noacct(bio); + cond_resched(); } }