diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-05-03 15:02:50 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-05-12 12:20:09 +0200 |
commit | 4b0c0f294f60abcdd20994a8341a95c8ac5eeb96 (patch) | |
tree | cdfb352f5cf66f5e5bb79fa9a975aabd891e1f62 /kernel/time | |
parent | fbd44a607a1a5019bc32c3615cead8c5ee8f89c9 (diff) | |
download | blackbird-op-linux-4b0c0f294f60abcdd20994a8341a95c8ac5eeb96.tar.gz blackbird-op-linux-4b0c0f294f60abcdd20994a8341a95c8ac5eeb96.zip |
tick: Cleanup NOHZ per cpu data on cpu down
Prarit reported a crash on CPU offline/online. The reason is that on
CPU down the NOHZ related per cpu data of the dead cpu is not cleaned
up. If at cpu online an interrupt happens before the per cpu tick
device is registered the irq_enter() check potentially sees stale data
and dereferences a NULL pointer.
Cleanup the data after the cpu is dead.
Reported-by: Prarit Bhargava <prarit@redhat.com>
Cc: stable@vger.kernel.org
Cc: Mike Galbraith <bitbucket@online.de>
Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1305031451561.2886@ionos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/tick-sched.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 225f8bf19095..0eed1db2d792 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -904,7 +904,7 @@ void tick_cancel_sched_timer(int cpu) hrtimer_cancel(&ts->sched_timer); # endif - ts->nohz_mode = NOHZ_MODE_INACTIVE; + memset(ts, 0, sizeof(*ts)); } #endif |