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)
committerMikulas Patocka <mpatocka@redhat.com>
Wed, 10 Dec 2025 18:28:22 +0000 (19:28 +0100)
commit8581b19eb2c5ccf06c195d3b5468c3c9d17a5020
tree1aa1056b006c7cc5a526ea84f683d8ac3bb44fb2
parentf4412c7d5a5ab34a6338e15d07fba25185fbb94c
dm-snapshot: fix 'scheduling while atomic' on real-time kernels

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>
drivers/md/dm-exception-store.h
drivers/md/dm-snap.c