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: [email protected] Signed-off-by: Pingfan Liu <[email protected]> Acked-by: Ming Lei <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent b0bbd86 commit 0ca44fc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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)