mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [BUG] lockdep: MAX_LOCKDEP_KEYS too low when destroying workqueues
@ 2025-11-30  9:03 许东洁
  2025-12-02  5:48 ` Heo
  0 siblings, 1 reply; 2+ messages in thread
From: 许东洁 @ 2025-11-30  9:03 UTC (permalink / raw)
  To: Heo, Zijlstra; +Cc: Jiangshan, Molnar, Deacon, Feng, Long, linux-kernel

Hello,

I found a lockdep issue using syzkaller where repeatedly destroying workqueues exhausts 
MAX_LOCKDEP_KEYS and disables the lock validator.

The bug triggers through:
nci_unregister_device -> destroy_workqueue -> drain_workqueue -> touch_wq_lockdep_map

Kernel output:
BUG: MAX_LOCKOCKDEP_KEYS too low!
turning off the locking correctness validator.

It appears workqueue lock classes are not properly released in destroy_workqueue, 
causing lock class leakage.

Config file: https://github.com/j1akai/KConfigFuzz_bug/blob/main/x86/mainline-config
Additional fuzzing context(report file, reproduce file, etc.):https://github.com/PLASSICAxu/OS-bug/tree/main/lockdep

Acknowledgments
Xu Dongjie
University of Chinese Academy of Sciences

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [BUG] lockdep: MAX_LOCKDEP_KEYS too low when destroying workqueues
  2025-11-30  9:03 [BUG] lockdep: MAX_LOCKDEP_KEYS too low when destroying workqueues 许东洁
@ 2025-12-02  5:48 ` Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Heo @ 2025-12-02  5:48 UTC (permalink / raw)
  To: 许东洁
  Cc: Zijlstra, Jiangshan, Molnar, Deacon, Feng, Long, linux-kernel

On Sun, Nov 30, 2025 at 05:03:53PM +0800, 许东洁 wrote:
> Hello,
> 
> I found a lockdep issue using syzkaller where repeatedly destroying workqueues exhausts 
> MAX_LOCKDEP_KEYS and disables the lock validator.
> 
> The bug triggers through:
> nci_unregister_device -> destroy_workqueue -> drain_workqueue -> touch_wq_lockdep_map
> 
> Kernel output:
> BUG: MAX_LOCKOCKDEP_KEYS too low!
> turning off the locking correctness validator.
> 
> It appears workqueue lock classes are not properly released in destroy_workqueue, 
> causing lock class leakage.

Looks like the repro ends up creating and destroying workqueues back to
back. Part of workqueue destruction is asynchronous, so if you do that
quickly enough, running out of lockdep keys isn't that surprising. I'm not
sure this is a meaningful bug report.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-02  5:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-30  9:03 [BUG] lockdep: MAX_LOCKDEP_KEYS too low when destroying workqueues 许东洁
2025-12-02  5:48 ` Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®