Skip to content

timers: Disable memory pre-allocation of timer debug objects

Waiman Long lkml oe-lkp 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 4 repliesIn review
  2. v13 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3debugobjects: Add ODEBUG_FLAG_NO_ALLOC to disable memory allocationinclude/linux/debugobjects.h lib/debugobjects.c+11 -50 replies
2/3debugobjects: Show the state of debug_objects_enabledlib/debugobjects.c+12 -70 replies
3/3timers: Disable memory pre-allocation of timer debug objectskernel/time/timer.c+1 -04 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

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

[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(-)
Signature · 1 line
2.49.0