[BUG] lockdep: MAX_LOCKDEP_KEYS too low when destroying workqueues
From: 许东洁
Date: Sun Nov 30 2025 - 04:09:50 EST
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