summaryrefslogtreecommitdiff
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorPingfan Liu <piliu@redhat.com>2023-02-15 19:23:40 +0800
committerMike Snitzer <snitzer@kernel.org>2023-02-16 12:06:44 -0500
commit0ca44fcef241768fd25ee763b3d203b9852f269b (patch)
treef9f29a6be4d2d5cdfa3533389ee9b1afc8e58515 /drivers/md/dm.c
parentb0bbd86a288ab35234edb704935982c20f74628d (diff)
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 <piliu@redhat.com> Acked-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 90b64bfc63b0..15b91959e433 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();
}
}