[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20191113131042.7719-1-ntsironis@arrikto.com>
Date: Wed, 13 Nov 2019 15:10:42 +0200
From: Nikos Tsironis <ntsironis@...ikto.com>
To: mpatocka@...hat.com, tglx@...utronix.de,
linux-rt-users@...r.kernel.org, msnitzer@...hat.com,
dm-devel@...hat.com, linux-kernel@...r.kernel.org
Cc: swood@...hat.com, linux-fsdevel@...r.kernel.org, dwagner@...e.de,
bigeasy@...utronix.de, iliastsi@...ikto.com, ntsironis@...ikto.com
Subject: [PATCH RT 2/2 v4] list_bl: avoid BUG when the list is not locked
list_bl would crash with BUG() if we used it without locking.
dm-snapshot uses its own locking on realtime kernels (it can't use
list_bl because list_bl uses raw spinlock and dm-snapshot takes other
non-raw spinlocks while holding bl_lock).
To avoid this BUG we deactivate the list debug checks for list_bl on
realtime kernels.
This patch is intended only for the realtime kernel patchset, not for
the upstream kernel.
Signed-off-by: Nikos Tsironis <ntsironis@...ikto.com>
Reviewed-by: Mikulas Patocka <mpatocka@...hat.com>
---
include/linux/list_bl.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/list_bl.h b/include/linux/list_bl.h
index da38433240f5..3585b2f6b948 100644
--- a/include/linux/list_bl.h
+++ b/include/linux/list_bl.h
@@ -25,7 +25,7 @@
#define LIST_BL_LOCKMASK 0UL
#endif
-#ifdef CONFIG_DEBUG_LIST
+#if defined(CONFIG_DEBUG_LIST) && !defined(CONFIG_PREEMPT_RT_BASE)
#define LIST_BL_BUG_ON(x) BUG_ON(x)
#else
#define LIST_BL_BUG_ON(x)
--
2.11.0
Powered by blists - more mailing lists