]> git.baikalelectronics.ru Git - kernel.git/commit
dm: add cond_resched() to dm_wq_requeue_work()
authorMike Snitzer <snitzer@kernel.org>
Thu, 16 Feb 2023 17:10:05 +0000 (12:10 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:34:21 +0000 (09:34 +0100)
commit621c5319c30ad612b4aa7d7944628c70cbd9dae8
treed6635ec5a141cbd2bbf750f269cd707d64c2dfb0
parent73064d0a9dd6657aeff4bcdb40d6fbceb04f9cac
dm: add cond_resched() to dm_wq_requeue_work()

commit 20abda3a4e6c3e1a999b03476a464c369f58d63d upstream.

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: 12ecb175b2b3f ("dm: add two stage requeue mechanism")
Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm.c