]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm-snapshot: fix 'scheduling while atomic' on real-time kernels
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 1 Dec 2025 21:13:10 +0000 (22:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jan 2026 15:31:19 +0000 (16:31 +0100)
commit6a1099604b0ca36083345207e9eaf276b3eaa285
tree1cc5cb18b1eec3510aeb342c70879e5ad79319e4
parentf002df3a33051cf3af99f477b216d40fea0d1d69
dm-snapshot: fix 'scheduling while atomic' on real-time kernels

[ Upstream commit 8581b19eb2c5ccf06c195d3b5468c3c9d17a5020 ]

There is reported 'scheduling while atomic' bug when using dm-snapshot on
real-time kernels. The reason for the bug is that the hlist_bl code does
preempt_disable() when taking the lock and the kernel attempts to take
other spinlocks while holding the hlist_bl lock.

Fix this by converting a hlist_bl spinlock into a regular spinlock.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reported-by: Jiping Ma <jiping.ma2@windriver.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/dm-exception-store.h
drivers/md/dm-snap.c