diff options
author | Pingfan Liu <piliu@redhat.com> | 2023-02-15 19:23:40 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-10 09:34:21 +0100 |
commit | 7f093695b49a0e46d2f1ad0c641dd04f8d20acd9 (patch) | |
tree | 48a429de50c55cef2866d4b39cc2bbba0f62dba4 /drivers/md | |
parent | bc0734f689f817821f2a86ada1ee51271b462e06 (diff) | |
download | linux-7f093695b49a0e46d2f1ad0c641dd04f8d20acd9.tar.gz |
dm: add cond_resched() to dm_wq_work()
commit 0ca44fcef241768fd25ee763b3d203b9852f269b upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index c9d034c952a4..212441671554 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -2578,6 +2578,7 @@ static void dm_wq_work(struct work_struct *work) break; submit_bio_noacct(bio); + cond_resched(); } } |