aboutsummaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorGravatar Mike Snitzer <snitzer@kernel.org> 2023-02-16 12:10:05 -0500
committerGravatar Mike Snitzer <snitzer@kernel.org> 2023-02-16 12:10:05 -0500
commitf77692d65d54665d81815349cc727baa85e8b71d (patch)
tree5a3a18362f53370945bcc13289af5e91ea3cbe56 /drivers/md
parentdm: add cond_resched() to dm_wq_work() (diff)
downloadlinux-f77692d65d54665d81815349cc727baa85e8b71d.tar.gz
linux-f77692d65d54665d81815349cc727baa85e8b71d.tar.bz2
linux-f77692d65d54665d81815349cc727baa85e8b71d.zip
dm: add cond_resched() to dm_wq_requeue_work()
Otherwise the while() loop in dm_wq_requeue_work() can result in a "dead loop" on systems that have preemption disabled. This is particularly problematic on single cpu systems. Fixes: 8b211aaccb915 ("dm: add two stage requeue mechanism") Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md')
-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 15b91959e433..adb002b8648d 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1009,6 +1009,7 @@ static void dm_wq_requeue_work(struct work_struct *work)
io->next = NULL;
__dm_io_complete(io, false);
io = next;
+ cond_resched();
}
}