* Re: [PATCH] locking: detect spin_lock_irq() call with disabled interrupts
[not found] <20250606095741.46775-1-ptikhomirov@virtuozzo.com>
@ 2025-06-06 16:09 ` kernel test robot
2025-06-06 21:09 ` kernel test robot
1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-06-06 16:09 UTC (permalink / raw)
To: Pavel Tikhomirov, Peter Zijlstra, Ingo Molnar, Will Deacon,
Boqun Feng, Waiman Long, Kees Cook, Joel Granados, Andrew Morton
Cc: oe-kbuild-all, Linux Memory Management List, Konstantin Khorenko,
Denis Lunev, Aleksandr Mikhalitsyn, Pavel Tikhomirov,
linux-kernel, linux-fsdevel, kernel
Hi Pavel,
kernel test robot noticed the following build errors:
[auto build test ERROR on tip/locking/core]
[also build test ERROR on sysctl/sysctl-next akpm-mm/mm-nonmm-unstable tip/master linus/master v6.15 next-20250606]
[cannot apply to mcgrof/sysctl-next tip/auto-latest]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Pavel-Tikhomirov/locking-detect-spin_lock_irq-call-with-disabled-interrupts/20250606-175911
base: tip/locking/core
patch link: https://lore.kernel.org/r/20250606095741.46775-1-ptikhomirov%40virtuozzo.com
patch subject: [PATCH] locking: detect spin_lock_irq() call with disabled interrupts
config: riscv-randconfig-002-20250606 (https://download.01.org/0day-ci/archive/20250606/202506062318.7g54PAh3-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250606/202506062318.7g54PAh3-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506062318.7g54PAh3-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
In file included from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/mm.h:7,
from arch/riscv/kernel/asm-offsets.c:8:
>> include/linux/spinlock.h:375:1: warning: data definition has no type or storage class
DECLARE_STATIC_KEY_MAYBE(CONFIG_DEBUG_SPINLOCK_IRQ_WITH_DISABLED_INTERRUPTS_BY_DEFAULT,
^~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/spinlock.h:375:1: error: type defaults to 'int' in declaration of 'DECLARE_STATIC_KEY_MAYBE' [-Werror=implicit-int]
>> include/linux/spinlock.h:376:5: warning: parameter names (without types) in function declaration
debug_spin_lock_irq_with_disabled_interrupts);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock.h: In function 'spin_lock_irq':
>> include/linux/spinlock.h:382:6: error: implicit declaration of function 'static_branch_unlikely' [-Werror=implicit-function-declaration]
if (static_branch_unlikely(&debug_spin_lock_irq_with_disabled_interrupts)) {
^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/spinlock.h:382:30: error: 'debug_spin_lock_irq_with_disabled_interrupts' undeclared (first use in this function)
if (static_branch_unlikely(&debug_spin_lock_irq_with_disabled_interrupts)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock.h:382:30: note: each undeclared identifier is reported only once for each function it appears in
>> include/linux/spinlock.h:384:4: error: implicit declaration of function 'static_branch_disable'; did you mean 'stack_trace_save'? [-Werror=implicit-function-declaration]
static_branch_disable(&debug_spin_lock_irq_with_disabled_interrupts);
^~~~~~~~~~~~~~~~~~~~~
stack_trace_save
include/linux/spinlock.h: In function 'spin_unlock_irq':
include/linux/spinlock.h:415:30: error: 'debug_spin_lock_irq_with_disabled_interrupts' undeclared (first use in this function)
if (static_branch_unlikely(&debug_spin_lock_irq_with_disabled_interrupts)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:98: arch/riscv/kernel/asm-offsets.s] Error 1 shuffle=2202685202
make[3]: Target 'prepare' not remade because of errors.
make[2]: *** [Makefile:1275: prepare0] Error 2 shuffle=2202685202
make[2]: Target 'prepare' not remade because of errors.
make[1]: *** [Makefile:248: __sub-make] Error 2 shuffle=2202685202
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2 shuffle=2202685202
make: Target 'prepare' not remade because of errors.
vim +375 include/linux/spinlock.h
373
374 #ifdef CONFIG_DEBUG_SPINLOCK
> 375 DECLARE_STATIC_KEY_MAYBE(CONFIG_DEBUG_SPINLOCK_IRQ_WITH_DISABLED_INTERRUPTS_BY_DEFAULT,
> 376 debug_spin_lock_irq_with_disabled_interrupts);
377 #endif
378
379 static __always_inline void spin_lock_irq(spinlock_t *lock)
380 {
381 #ifdef CONFIG_DEBUG_SPINLOCK
> 382 if (static_branch_unlikely(&debug_spin_lock_irq_with_disabled_interrupts)) {
383 if (raw_irqs_disabled()) {
> 384 static_branch_disable(&debug_spin_lock_irq_with_disabled_interrupts);
385 WARN(1, "spin_lock_irq() called with irqs disabled!\n");
386 }
387 }
388 #endif
389 raw_spin_lock_irq(&lock->rlock);
390 }
391
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] locking: detect spin_lock_irq() call with disabled interrupts
[not found] <20250606095741.46775-1-ptikhomirov@virtuozzo.com>
2025-06-06 16:09 ` [PATCH] locking: detect spin_lock_irq() call with disabled interrupts kernel test robot
@ 2025-06-06 21:09 ` kernel test robot
1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-06-06 21:09 UTC (permalink / raw)
To: Pavel Tikhomirov, Peter Zijlstra, Ingo Molnar, Will Deacon,
Boqun Feng, Waiman Long, Kees Cook, Joel Granados, Andrew Morton
Cc: llvm, oe-kbuild-all, Linux Memory Management List,
Konstantin Khorenko, Denis Lunev, Aleksandr Mikhalitsyn,
Pavel Tikhomirov, linux-kernel, linux-fsdevel, kernel
Hi Pavel,
kernel test robot noticed the following build warnings:
[auto build test WARNING on tip/locking/core]
[also build test WARNING on sysctl/sysctl-next akpm-mm/mm-nonmm-unstable tip/master linus/master v6.15 next-20250606]
[cannot apply to mcgrof/sysctl-next tip/auto-latest]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Pavel-Tikhomirov/locking-detect-spin_lock_irq-call-with-disabled-interrupts/20250606-175911
base: tip/locking/core
patch link: https://lore.kernel.org/r/20250606095741.46775-1-ptikhomirov%40virtuozzo.com
patch subject: [PATCH] locking: detect spin_lock_irq() call with disabled interrupts
config: arm-randconfig-003-20250606 (https://download.01.org/0day-ci/archive/20250607/202506070405.MCweX7O0-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250607/202506070405.MCweX7O0-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506070405.MCweX7O0-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from arch/arm/plat-orion/irq.c:13:
In file included from include/linux/irq.h:14:
include/linux/spinlock.h:375:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
375 | DECLARE_STATIC_KEY_MAYBE(CONFIG_DEBUG_SPINLOCK_IRQ_WITH_DISABLED_INTERRUPTS_BY_DEFAULT,
| ^
| int
include/linux/spinlock.h:375:26: error: a parameter list without types is only allowed in a function definition
375 | DECLARE_STATIC_KEY_MAYBE(CONFIG_DEBUG_SPINLOCK_IRQ_WITH_DISABLED_INTERRUPTS_BY_DEFAULT,
| ^
include/linux/spinlock.h:382:6: error: call to undeclared function 'static_branch_unlikely'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
382 | if (static_branch_unlikely(&debug_spin_lock_irq_with_disabled_interrupts)) {
| ^
include/linux/spinlock.h:382:30: error: use of undeclared identifier 'debug_spin_lock_irq_with_disabled_interrupts'
382 | if (static_branch_unlikely(&debug_spin_lock_irq_with_disabled_interrupts)) {
| ^
include/linux/spinlock.h:384:4: error: call to undeclared function 'static_branch_disable'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
384 | static_branch_disable(&debug_spin_lock_irq_with_disabled_interrupts);
| ^
include/linux/spinlock.h:384:27: error: use of undeclared identifier 'debug_spin_lock_irq_with_disabled_interrupts'
384 | static_branch_disable(&debug_spin_lock_irq_with_disabled_interrupts);
| ^
include/linux/spinlock.h:415:6: error: call to undeclared function 'static_branch_unlikely'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
415 | if (static_branch_unlikely(&debug_spin_lock_irq_with_disabled_interrupts)) {
| ^
include/linux/spinlock.h:415:30: error: use of undeclared identifier 'debug_spin_lock_irq_with_disabled_interrupts'
415 | if (static_branch_unlikely(&debug_spin_lock_irq_with_disabled_interrupts)) {
| ^
include/linux/spinlock.h:417:4: error: call to undeclared function 'static_branch_disable'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
417 | static_branch_disable(&debug_spin_lock_irq_with_disabled_interrupts);
| ^
include/linux/spinlock.h:417:27: error: use of undeclared identifier 'debug_spin_lock_irq_with_disabled_interrupts'
417 | static_branch_disable(&debug_spin_lock_irq_with_disabled_interrupts);
| ^
>> arch/arm/plat-orion/irq.c:37:29: warning: shift count >= width of type [-Wshift-count-overflow]
37 | irq_setup_generic_chip(gc, IRQ_MSK(32), IRQ_GC_INIT_MASK_CACHE,
| ^~~~~~~~~~~
include/linux/irq.h:1223:41: note: expanded from macro 'IRQ_MSK'
1223 | #define IRQ_MSK(n) (u32)((n) < 32 ? ((1 << (n)) - 1) : UINT_MAX)
| ^ ~~~
1 warning and 10 errors generated.
vim +37 arch/arm/plat-orion/irq.c
f28d7de6bd4d41 Sebastian Hesselbarth 2014-01-16 21
01eb569823792a Lennert Buytenhek 2008-03-27 22 void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr)
01eb569823792a Lennert Buytenhek 2008-03-27 23 {
e59347a1d15c0b Thomas Gleixner 2011-04-14 24 struct irq_chip_generic *gc;
e59347a1d15c0b Thomas Gleixner 2011-04-14 25 struct irq_chip_type *ct;
01eb569823792a Lennert Buytenhek 2008-03-27 26
01eb569823792a Lennert Buytenhek 2008-03-27 27 /*
01eb569823792a Lennert Buytenhek 2008-03-27 28 * Mask all interrupts initially.
01eb569823792a Lennert Buytenhek 2008-03-27 29 */
01eb569823792a Lennert Buytenhek 2008-03-27 30 writel(0, maskaddr);
01eb569823792a Lennert Buytenhek 2008-03-27 31
e59347a1d15c0b Thomas Gleixner 2011-04-14 32 gc = irq_alloc_generic_chip("orion_irq", 1, irq_start, maskaddr,
f38c02f3b33865 Thomas Gleixner 2011-03-24 33 handle_level_irq);
e59347a1d15c0b Thomas Gleixner 2011-04-14 34 ct = gc->chip_types;
e59347a1d15c0b Thomas Gleixner 2011-04-14 35 ct->chip.irq_mask = irq_gc_mask_clr_bit;
e59347a1d15c0b Thomas Gleixner 2011-04-14 36 ct->chip.irq_unmask = irq_gc_mask_set_bit;
e59347a1d15c0b Thomas Gleixner 2011-04-14 @37 irq_setup_generic_chip(gc, IRQ_MSK(32), IRQ_GC_INIT_MASK_CACHE,
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-06 21:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20250606095741.46775-1-ptikhomirov@virtuozzo.com>
2025-06-06 16:09 ` [PATCH] locking: detect spin_lock_irq() call with disabled interrupts kernel test robot
2025-06-06 21:09 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).