mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-22 05:01:27 +00:00
Let's not crash if BUG triggered with IRQs or BHs disabled. At least, in the debug build.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3198 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -34,20 +34,22 @@
|
||||
#if !defined(INSIDE_KERNEL_TREE)
|
||||
#ifdef CONFIG_SCST_DEBUG
|
||||
|
||||
#ifndef CONFIG_DEBUG_BUGVERBOSE
|
||||
#define sBUG() do { \
|
||||
printk(KERN_CRIT "BUG at %s:%d\n", \
|
||||
__FILE__, __LINE__); \
|
||||
local_irq_enable(); \
|
||||
while (in_softirq()) \
|
||||
local_bh_enable(); \
|
||||
BUG(); \
|
||||
} while (0)
|
||||
#else
|
||||
#define sBUG() BUG()
|
||||
#endif
|
||||
|
||||
#define sBUG_ON(p) do { \
|
||||
if (unlikely(p)) { \
|
||||
printk(KERN_CRIT "BUG at %s:%d (%s)\n", \
|
||||
__FILE__, __LINE__, #p); \
|
||||
local_irq_enable(); \
|
||||
while (in_softirq()) \
|
||||
local_bh_enable(); \
|
||||
BUG(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
Reference in New Issue
Block a user