Commit 0ca44fce authored by Pingfan Liu's avatar Pingfan Liu Committed by Mike Snitzer

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: default avatarPingfan Liu <piliu@redhat.com>
Acked-by: default avatarMing Lei <ming.lei@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
parent b0bbd86a
......@@ -2570,6 +2570,7 @@ static void dm_wq_work(struct work_struct *work)
break;
submit_bio_noacct(bio);
cond_resched();
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment