All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] debugobjects: Allow object pool refill mostly in non-atomic context
@ 2025-06-17  5:35 Waiman Long
  2025-06-17  5:35 ` [PATCH v3 1/2] debugobjects: Show the state of debug_objects_enabled Waiman Long
  2025-06-17  5:35 ` [PATCH v3 2/2] debugobjects: Allow object pool refill mostly in non-atomic context Waiman Long
  0 siblings, 2 replies; 5+ messages in thread
From: Waiman Long @ 2025-06-17  5:35 UTC (permalink / raw)
  To: Thomas Gleixner, Andrew Morton; +Cc: linux-kernel, Waiman Long

 v3:
  - Use deferred printk for printing the debug object disable message.
  - Drop the last timer specific memory allocation disablement patch &
    limit memory allocation mostly to non-atomic context instead.

A circular locking dependency was reported by lockdep involving printk()
called from within the memory allocator, console driver with timeout
capability and timer code calling debug_object_activate() doing object
pool refill by allocating memory.

The original approach of disabling memory allocation for timer debug
objects didn't work. Now this series try to limit memory allocation
mostly to non-atomic contexts instead. This will ensure that new object
allocation won't happen in contexts where a spinlock (or a raw spinlock)
has been held or in a non-task context except for the init call, though
a sleeping lock may still be held. This should reduce the chance of
deadlock due to this kind of circular lock dependency.

Waiman Long (2):
  debugobjects: Show the state of debug_objects_enabled
  debugobjects: Allow object pool refill mostly in non-atomic context

 lib/Kconfig.debug  |  1 +
 lib/debugobjects.c | 34 +++++++++++++++++++++++-----------
 2 files changed, 24 insertions(+), 11 deletions(-)

-- 
2.49.0


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

end of thread, other threads:[~2025-06-26 15:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-17  5:35 [PATCH v3 0/2] debugobjects: Allow object pool refill mostly in non-atomic context Waiman Long
2025-06-17  5:35 ` [PATCH v3 1/2] debugobjects: Show the state of debug_objects_enabled Waiman Long
2025-06-17  5:35 ` [PATCH v3 2/2] debugobjects: Allow object pool refill mostly in non-atomic context Waiman Long
2025-06-24  8:28   ` kernel test robot
2025-06-26 15:22   ` Thomas Gleixner

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.