]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm-delay: fix hung task introduced by kthread mode
authorJoel Colledge <joel.colledge@linbit.com>
Mon, 6 May 2024 07:25:23 +0000 (09:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2024 07:49:24 +0000 (09:49 +0200)
commitcffa552c75ba213493a398875787b5e95c2cdd35
tree206a34a4dfb817fcc2835f068cc820430dac6da8
parent9c0229293585cb8968c649487d9502ab8b60ffc6
dm-delay: fix hung task introduced by kthread mode

[ Upstream commit d14646f23300a5fc85be867bafdc0702c2002789 ]

If the worker thread is not woken due to a bio, then it is not woken at
all. This causes the hung task check to trigger. This occurs, for
instance, when no bios are submitted. Also when a delay of 0 is
configured, delay_bio() returns without waking the worker.

Prevent the hung task check from triggering by creating the thread with
kthread_run() instead of using kthread_create() directly.

Fixes: 70bbeb29fab0 ("dm delay: for short delays, use kthread instead of timers and wq")
Signed-off-by: Joel Colledge <joel.colledge@linbit.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/dm-delay.c