diff options
author | Peter Zijlstra <[email protected]> | 2015-06-11 14:46:48 +0200 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2015-06-19 00:09:56 +0200 |
commit | 887d9dc989eb0154492e41e7c07492edbb088ba1 (patch) | |
tree | 53f3c08252d60c9ceb32fa488c1e0ab77a95b9ef /lib/memory-notifier-error-inject.c | |
parent | c4bfa3f5f906aee2e084c5b1fb15caf876338ef8 (diff) |
hrtimer: Allow hrtimer::function() to free the timer
Currently an hrtimer callback function cannot free its own timer
because __run_hrtimer() still needs to clear HRTIMER_STATE_CALLBACK
after it. Freeing the timer would result in a clear use-after-free.
Solve this by using a scheme similar to regular timers; track the
current running timer in hrtimer_clock_base::running.
Suggested-by: Thomas Gleixner <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Al Viro <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Paul McKenney <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions