[PATCH 0/3] timers: Disable memory pre-allocation of timer debug objects

Waiman Long posted 3 patches 6 months, 2 weeks ago
There is a newer version of this series
include/linux/debugobjects.h |  6 ++++++
kernel/time/timer.c          |  1 +
lib/debugobjects.c           | 29 +++++++++++++++++------------
3 files changed, 24 insertions(+), 12 deletions(-)
[PATCH 0/3] timers: Disable memory pre-allocation of timer debug objects
Posted by Waiman Long 6 months, 2 weeks ago
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