mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] locking/lockdep: Track number of zapped classes & report abuse
@ 2018-11-29 22:41 Waiman Long
  2018-11-29 22:41 ` [PATCH 1/2] locking/lockdep: Annotate #else/#endif's that are far from #if Waiman Long
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Waiman Long @ 2018-11-29 22:41 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Will Deacon, Thomas Gleixner
  Cc: linux-kernel, Waiman Long

When a kernel module is repeatedly load and unload, it will eventually
exhaust the lockdep entries resulting in a bug message. This is a use
case that the current lockdep code cannot support.

This patchset tracks the number of zapped classes and print a warning if
too many lockdep entries are wasted because of too many module unloading.
For example,

[ 2490.651531] BUG: MAX_LOCKDEP_KEYS too low!
[ 2490.669925] turning off the locking correctness validator.
[ 2490.669925] Please attach the output of /proc/lock_stat to the bug report
[ 2490.669926] ========================================================
[ 2490.669927] WARNING: 6499 out of 8191 locks have been destroyed
[ 2490.669927] through kernel module unload operations.
[ 2490.669928] The corresponding lockdep entries are not reusable.
[ 2490.669928] The system might have run out of lockdep entries because
[ 2490.669929] of repeated kernel module load and unload operations.
[ 2490.669929] Lockdep cannot support this particular use case.
[ 2490.669930] --------------------------------------------------------

Waiman Long (2):
  locking/lockdep: Annotate #else/#endif's that are far from #if
  locking/lockdep: Track number of zapped classes & report abuse

 kernel/locking/lockdep.c           | 42 ++++++++++++++++++++++++++++++--------
 kernel/locking/lockdep_internals.h |  1 +
 kernel/locking/lockdep_proc.c      |  2 ++
 3 files changed, 37 insertions(+), 8 deletions(-)

-- 
1.8.3.1


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

end of thread, other threads:[~2018-12-05 15:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-29 22:41 [PATCH 0/2] locking/lockdep: Track number of zapped classes & report abuse Waiman Long
2018-11-29 22:41 ` [PATCH 1/2] locking/lockdep: Annotate #else/#endif's that are far from #if Waiman Long
2018-11-29 22:41 ` [PATCH 2/2] locking/lockdep: Track number of zapped classes & report abuse Waiman Long
2018-11-29 22:48 ` [PATCH 0/2] " Peter Zijlstra
2018-11-30 14:38   ` Waiman Long
2018-12-05 15:37     ` Waiman Long

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

Powered by JetHome