From: kernel test robot <lkp@intel.com>
To: Boqun Feng <boqun.feng@gmail.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Lyude Paul <lyude@redhat.com>
Subject: [boqun:rust-sync 6/10] include/linux/spinlock.h:388:1: warning: raw_spinlock 'lock->.rlock' is still held at the end of function
Date: Thu, 19 Mar 2026 17:16:04 +0800 [thread overview]
Message-ID: <202603191712.uxBdFAep-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux.git rust-sync
head: 754219dea900fe187e29e8b5ff9fa49238e394c7
commit: b5db14c62254a116585d2620ccee08d1613c25e3 [6/10] irq & spin_lock: Add counted interrupt disabling/enabling
config: hexagon-randconfig-001-20260319 (https://download.01.org/0day-ci/archive/20260319/202603191712.uxBdFAep-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 4abb927bacf37f18f6359a41639a6d1b3bffffb5)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260319/202603191712.uxBdFAep-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/202603191712.uxBdFAep-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from crypto/rsa.c:9:
In file included from include/linux/module.h:18:
In file included from include/linux/kmod.h:9:
In file included from include/linux/umh.h:4:
In file included from include/linux/gfp.h:7:
In file included from include/linux/mmzone.h:8:
>> include/linux/spinlock.h:388:1: warning: raw_spinlock 'lock->.rlock' is still held at the end of function [-Wthread-safety-analysis]
388 | }
| ^
include/linux/spinlock.h:387:2: note: raw_spinlock acquired here
387 | raw_spin_lock_irq_disable(&lock->rlock);
| ^
include/linux/spinlock.h:277:41: note: expanded from macro 'raw_spin_lock_irq_disable'
277 | #define raw_spin_lock_irq_disable(lock) _raw_spin_lock_irq_disable(lock)
| ^
include/linux/spinlock_api_up.h:80:42: note: expanded from macro '_raw_spin_lock_irq_disable'
80 | #define _raw_spin_lock_irq_disable(lock) __LOCK_IRQ_DISABLE(lock)
| ^
include/linux/spinlock_api_up.h:46:35: note: expanded from macro '__LOCK_IRQ_DISABLE'
46 | do { local_interrupt_disable(); __LOCK(lock, ##__VA_ARGS__); } while (0)
| ^
include/linux/spinlock_api_up.h:34:27: note: expanded from macro '__LOCK'
34 | do { preempt_disable(); ___LOCK_##__VA_ARGS__(lock); } while (0)
| ^
include/linux/spinlock_api_up.h:28:8: note: expanded from macro '___LOCK_'
28 | do { __acquire(lock); (void)(lock); } while (0)
| ^
include/linux/compiler-context-analysis.h:361:23: note: expanded from macro '__acquire'
361 | #define __acquire(x) __acquire_ctx_lock(x)
| ^
In file included from crypto/rsa.c:9:
In file included from include/linux/module.h:18:
In file included from include/linux/kmod.h:9:
In file included from include/linux/umh.h:4:
In file included from include/linux/gfp.h:7:
In file included from include/linux/mmzone.h:8:
>> include/linux/spinlock.h:422:2: warning: releasing raw_spinlock 'lock->.rlock' that was not held [-Wthread-safety-analysis]
422 | raw_spin_unlock_irq_enable(&lock->rlock);
| ^
include/linux/spinlock.h:281:42: note: expanded from macro 'raw_spin_unlock_irq_enable'
281 | #define raw_spin_unlock_irq_enable(lock) _raw_spin_unlock_irq_enable(lock)
| ^
include/linux/spinlock_api_up.h:143:43: note: expanded from macro '_raw_spin_unlock_irq_enable'
143 | #define _raw_spin_unlock_irq_enable(lock) __UNLOCK_IRQ_ENABLE(lock)
| ^
include/linux/spinlock_api_up.h:68:8: note: expanded from macro '__UNLOCK_IRQ_ENABLE'
68 | do { __UNLOCK(lock, ##__VA_ARGS__); local_interrupt_enable(); } while (0)
| ^
include/linux/spinlock_api_up.h:55:26: note: expanded from macro '__UNLOCK'
55 | do { preempt_enable(); ___UNLOCK_##__VA_ARGS__(lock); } while (0)
| ^
include/linux/spinlock_api_up.h:49:8: note: expanded from macro '___UNLOCK_'
49 | do { __release(lock); (void)(lock); } while (0)
| ^
include/linux/compiler-context-analysis.h:369:23: note: expanded from macro '__release'
369 | #define __release(x) __release_ctx_lock(x)
| ^
2 warnings generated.
vim +388 include/linux/spinlock.h
384
385 static __always_inline void spin_lock_irq_disable(spinlock_t *lock)
386 {
387 raw_spin_lock_irq_disable(&lock->rlock);
> 388 }
389
390 #define spin_lock_irqsave(lock, flags) \
391 do { \
392 raw_spin_lock_irqsave(spinlock_check(lock), flags); \
393 __release(spinlock_check(lock)); __acquire(lock); \
394 } while (0)
395
396 #define spin_lock_irqsave_nested(lock, flags, subclass) \
397 do { \
398 raw_spin_lock_irqsave_nested(spinlock_check(lock), flags, subclass); \
399 __release(spinlock_check(lock)); __acquire(lock); \
400 } while (0)
401
402 static __always_inline void spin_unlock(spinlock_t *lock)
403 __releases(lock) __no_context_analysis
404 {
405 raw_spin_unlock(&lock->rlock);
406 }
407
408 static __always_inline void spin_unlock_bh(spinlock_t *lock)
409 __releases(lock) __no_context_analysis
410 {
411 raw_spin_unlock_bh(&lock->rlock);
412 }
413
414 static __always_inline void spin_unlock_irq(spinlock_t *lock)
415 __releases(lock) __no_context_analysis
416 {
417 raw_spin_unlock_irq(&lock->rlock);
418 }
419
420 static __always_inline void spin_unlock_irq_enable(spinlock_t *lock)
421 {
> 422 raw_spin_unlock_irq_enable(&lock->rlock);
423 }
424
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-03-19 9:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202603191712.uxBdFAep-lkp@intel.com \
--to=lkp@intel.com \
--cc=boqun.feng@gmail.com \
--cc=llvm@lists.linux.dev \
--cc=lyude@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox