public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] timers: Disable memory pre-allocation of timer debug objects
@ 2025-06-06  3:15 Waiman Long
  2025-06-06  3:15 ` [PATCH v2 1/3] debugobjects: Add ODEBUG_FLAG_NO_ALLOC to disable memory allocation Waiman Long
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Waiman Long @ 2025-06-06  3:15 UTC (permalink / raw)
  To: Thomas Gleixner, Andrew Morton, Anna-Maria Behnsen,
	Frederic Weisbecker
  Cc: linux-kernel, Waiman Long

 [v2] Fix a typo in patch 2 that is causing compilation problem as
      reported by kernel test robot.

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.

One simple way to break this circular locking dependency is to disable
memory allocation when timer debug objects are being handled which is
what this series is about. The majority of the changes is in the
debugobjects code with a one-line change in the timer code.

I have also considered updating the console driver to not hold the lock
when setting up timeout, but many console drivers are using timeout in
some ways. So this problem may not specific to just a single one.

Waiman Long (3):
  debugobjects: Add ODEBUG_FLAG_NO_ALLOC to disable memory allocation
  debugobjects: Show the state of debug_objects_enabled
  timers: Disable memory pre-allocation of timer debug objects

 include/linux/debugobjects.h |  6 ++++++
 kernel/time/timer.c          |  1 +
 lib/debugobjects.c           | 29 +++++++++++++++++------------
 3 files changed, 24 insertions(+), 12 deletions(-)

-- 
2.49.0


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

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

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-06  3:15 [PATCH v2 0/3] timers: Disable memory pre-allocation of timer debug objects Waiman Long
2025-06-06  3:15 ` [PATCH v2 1/3] debugobjects: Add ODEBUG_FLAG_NO_ALLOC to disable memory allocation Waiman Long
2025-06-06  3:15 ` [PATCH v2 2/3] debugobjects: Show the state of debug_objects_enabled Waiman Long
2025-06-06  3:15 ` [PATCH v2 3/3] timers: Disable memory pre-allocation of timer debug objects Waiman Long
2025-06-12  4:55   ` kernel test robot
2025-06-12 21:00     ` Thomas Gleixner
2025-06-12 22:03   ` Thomas Gleixner
2025-06-13 15:13     ` Waiman Long
2025-06-13 15:40       ` Thomas Gleixner

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