* [boqun:rust-sync 6/10] include/linux/spinlock_api_smp.h:164:1: warning: raw_spinlock 'lock' is still held at the end of function
@ 2026-03-19 8:52 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-03-19 8:52 UTC (permalink / raw)
To: Boqun Feng; +Cc: llvm, oe-kbuild-all, Lyude Paul
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: riscv-defconfig (https://download.01.org/0day-ci/archive/20260319/202603191632.hv1p7osp-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/202603191632.hv1p7osp-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/202603191632.hv1p7osp-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from crypto/api.c:17:
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:
In file included from include/linux/spinlock.h:312:
>> include/linux/spinlock_api_smp.h:164:1: warning: raw_spinlock 'lock' is still held at the end of function [-Wthread-safety-analysis]
164 | }
| ^
include/linux/spinlock_api_smp.h:163:44: note: raw_spinlock acquired here
163 | LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
| ^
>> include/linux/spinlock_api_smp.h:214:2: warning: releasing raw_spinlock 'lock' that was not held [-Wthread-safety-analysis]
214 | do_raw_spin_unlock(lock);
| ^
In file included from crypto/api.c:17:
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.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)
| ^
4 warnings generated.
vim +/lock +164 include/linux/spinlock_api_smp.h
158
159 static inline void __raw_spin_lock_irq_disable(raw_spinlock_t *lock)
160 {
161 local_interrupt_disable();
162 spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
163 LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
> 164 }
165
166 static inline void __raw_spin_lock_bh(raw_spinlock_t *lock)
167 __acquires(lock) __no_context_analysis
168 {
169 __local_bh_disable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET);
170 spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
171 LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
172 }
173
174 static inline void __raw_spin_lock(raw_spinlock_t *lock)
175 __acquires(lock) __no_context_analysis
176 {
177 preempt_disable();
178 spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
179 LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
180 }
181
182 #endif /* !CONFIG_GENERIC_LOCKBREAK || CONFIG_DEBUG_LOCK_ALLOC */
183
184 static inline void __raw_spin_unlock(raw_spinlock_t *lock)
185 __releases(lock)
186 {
187 spin_release(&lock->dep_map, _RET_IP_);
188 do_raw_spin_unlock(lock);
189 preempt_enable();
190 }
191
192 static inline void __raw_spin_unlock_irqrestore(raw_spinlock_t *lock,
193 unsigned long flags)
194 __releases(lock)
195 {
196 spin_release(&lock->dep_map, _RET_IP_);
197 do_raw_spin_unlock(lock);
198 local_irq_restore(flags);
199 preempt_enable();
200 }
201
202 static inline void __raw_spin_unlock_irq(raw_spinlock_t *lock)
203 __releases(lock)
204 {
205 spin_release(&lock->dep_map, _RET_IP_);
206 do_raw_spin_unlock(lock);
207 local_irq_enable();
208 preempt_enable();
209 }
210
211 static inline void __raw_spin_unlock_irq_enable(raw_spinlock_t *lock)
212 {
213 spin_release(&lock->dep_map, _RET_IP_);
> 214 do_raw_spin_unlock(lock);
215 local_interrupt_enable();
216 }
217
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-03-19 8:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-19 8:52 [boqun:rust-sync 6/10] include/linux/spinlock_api_smp.h:164:1: warning: raw_spinlock 'lock' is still held at the end of function kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.