dm: add cond_resched() to dm_wq_work()
authorPingfan Liu <piliu@redhat.com>
Wed, 15 Feb 2023 11:23:40 +0000 (19:23 +0800)
committerMike Snitzer <snitzer@kernel.org>
Thu, 16 Feb 2023 17:06:44 +0000 (12:06 -0500)
commit0ca44fcef241768fd25ee763b3d203b9852f269b
treef9f29a6be4d2d5cdfa3533389ee9b1afc8e58515
parentb0bbd86a288ab35234edb704935982c20f74628d
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>
drivers/md/dm.c