Skip to content

Commit 0ca44fc

Browse files
Pingfan LiuMike Snitzer
authored andcommitted
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>
1 parent b0bbd86 commit 0ca44fc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/md/dm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2570,6 +2570,7 @@ static void dm_wq_work(struct work_struct *work)
25702570
break;
25712571

25722572
submit_bio_noacct(bio);
2573+
cond_resched();
25732574
}
25742575
}
25752576

0 commit comments

Comments
 (0)