All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 00/16] timers: Plug debugobject leaks and use del_timer_sync() in exit/teardown
@ 2014-03-23 15:09 Thomas Gleixner
  2014-03-23 15:09 ` [patch 01/16] s390: tape: Use del_timer_sync() Thomas Gleixner
                   ` (16 more replies)
  0 siblings, 17 replies; 42+ messages in thread
From: Thomas Gleixner @ 2014-03-23 15:09 UTC (permalink / raw)
  To: LKML; +Cc: Julia Lawall, Andrew Morton

Timers on stack must be initialized with init_timer_on_stack() which
creates a tracking object if DEBUG_OBJECTS is enabled. Quite some
places miss the complementary destroy_timer_on_stack(), which frees the
tracking object. So we leak the tracking object in the debug objects
store.

While looking at that, one affected driver also used del_timer()
instead of del_timer_sync() before returning, which is wrong as well
as del_timer() meriliy dequeues an armed timer, but does not wait for
a callback which is executed on a different cpu.

So I started to look through del_timer() sites and fixed a bunch of
obvious teardown, module exit pathes which must use del_timer_sync().

As I'm about to travel, I gave up on reviewing all the usage sites of
del_timer().

Maybe Julia has an idea to automate the scan a bit. The paring for
init_timer_on_stack/destroy_timer_on_stack should be easy enough, but
the del_timer() one is pretty complex and definitly needs manual
auditing, but having a scan assistant to identify potential places
would be definitely helpful.

Thanks,

	tglx
---
 drivers/atm/firestream.c           |    2 +-
 drivers/atm/idt77105.c             |    6 +++---
 drivers/block/cpqarray.c           |    2 +-
 drivers/block/umem.c               |    2 +-
 drivers/block/xsysace.c            |    2 ++
 drivers/bluetooth/bluecard_cs.c    |    2 +-
 drivers/bluetooth/hci_bcsp.c       |    2 +-
 drivers/bluetooth/hci_h5.c         |    2 +-
 drivers/cpufreq/intel_pstate.c     |    2 +-
 drivers/input/serio/hp_sdc.c       |    2 +-
 drivers/s390/char/tape_std.c       |    3 ++-
 drivers/s390/net/lcs.c             |    1 +
 drivers/scsi/qla1280.c             |    1 +
 drivers/thermal/intel_powerclamp.c |    1 +
 kernel/rcu/torture.c               |    4 +++-
 15 files changed, 21 insertions(+), 13 deletions(-)




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

end of thread, other threads:[~2014-03-26 18:53 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-23 15:09 [patch 00/16] timers: Plug debugobject leaks and use del_timer_sync() in exit/teardown Thomas Gleixner
2014-03-23 15:09 ` [patch 01/16] s390: tape: Use del_timer_sync() Thomas Gleixner
2014-03-24  6:22   ` Heiko Carstens
2014-03-23 15:09 ` [patch 03/16] s390: net: lcs: Add missing destroy_timer_on_stack() Thomas Gleixner
2014-03-24  6:22   ` Heiko Carstens
2014-03-23 15:09 ` [patch 02/16] s390: tape: " Thomas Gleixner
2014-03-24  6:22   ` Heiko Carstens
2014-03-23 15:09 ` [patch 04/16] scsi: qla1280: " Thomas Gleixner
2014-03-23 15:09 ` [patch 05/16] thermal: powerclamp: " Thomas Gleixner
2014-03-23 15:09 ` [patch 06/16] rcu: torture: " Thomas Gleixner
2014-03-23 16:01   ` Paul E. McKenney
2014-03-23 18:13   ` Josh Triplett
2014-03-23 15:09 ` [patch 08/16] atm: idt77105: Use del_timer_sync() in exit path Thomas Gleixner
2014-03-26  1:06   ` David Miller
2014-03-23 15:09 ` [patch 07/16] atm: firestream: Use del_timer_sync() in teardown path Thomas Gleixner
2014-03-26  1:06   ` David Miller
2014-03-23 15:09 ` [patch 10/16] block: umem: Use del_timer_sync() in exit path Thomas Gleixner
2014-03-23 15:09 ` [patch 09/16] block: cpqarray: Use del_timer_sync() in teardown Thomas Gleixner
2014-03-23 15:09 ` [patch 11/16] block: xsysace; Use del_timer_sync() in exit path Thomas Gleixner
2014-03-23 15:09 ` [patch 12/16] bt: bluecard: Use del_timer_sync() in teardown path Thomas Gleixner
2014-03-23 15:09   ` Thomas Gleixner
2014-03-23 17:30   ` Marcel Holtmann
2014-03-23 15:09 ` [patch 13/16] bt: hci-bcsp: " Thomas Gleixner
2014-03-23 15:09   ` Thomas Gleixner
2014-03-23 17:30   ` Marcel Holtmann
2014-03-23 15:09 ` [patch 14/16] bt: hci-h5: Use del_timer_sync() in exit path Thomas Gleixner
2014-03-23 15:09   ` Thomas Gleixner
2014-03-23 17:30   ` Marcel Holtmann
2014-03-23 15:09 ` [patch 15/16] cpufreq: intel-pstate: Use del_timer_sync in intel_pstate_cpu_exit() Thomas Gleixner
2014-03-24  1:56   ` Rafael J. Wysocki
2014-03-24 14:18     ` Dirk Brandewie
2014-03-24  4:45   ` Viresh Kumar
2014-03-23 15:09 ` [patch 16/16] input: serio: hp_sdc: Use del_timer_sync() in exit path Thomas Gleixner
2014-03-24  0:24   ` Dmitry Torokhov
2014-03-23 22:34 ` [patch 00/16] timers: Plug debugobject leaks and use del_timer_sync() in exit/teardown Julia Lawall
2014-03-23 23:37   ` Thomas Gleixner
2014-03-24  6:50     ` Julia Lawall
2014-03-24  7:29     ` Julia Lawall
2014-03-24  9:03       ` Thomas Gleixner
2014-03-25 21:08   ` Thomas Gleixner
2014-03-25 21:19     ` Julia Lawall
2014-03-26 18:53     ` Julia Lawall

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.