summaryrefslogtreecommitdiff
path: root/firmware/ositech
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2013-06-26 10:17:32 (GMT)
committerThomas Gleixner <tglx@linutronix.de>2013-07-02 12:26:44 (GMT)
commitc9b5a266b103af873abb9ac03bc3d067702c8f4b (patch)
tree91e5ec118a7e96b998e18a8601d8f14c76d94823 /firmware/ositech
parent47433b8c9d7480a3eebd99df38e857ce85a37cee (diff)
downloadlinux-fsl-qoriq-c9b5a266b103af873abb9ac03bc3d067702c8f4b.tar.xz
tick: Make oneshot broadcast robust vs. CPU offlining
In periodic mode we remove offline cpus from the broadcast propagation mask. In oneshot mode we fail to do so. This was not a problem so far, but the recent changes to the broadcast propagation introduced a constellation which can result in a NULL pointer dereference. What happens is: CPU0 CPU1 idle() arch_idle() tick_broadcast_oneshot_control(OFF); set cpu1 in tick_broadcast_force_mask if (cpu_offline()) arch_cpu_dead() cpu_dead_cleanup(cpu1) cpu1 tickdevice pointer = NULL broadcast interrupt dereference cpu1 tickdevice pointer -> OOPS We dereference the pointer because cpu1 is still set in tick_broadcast_force_mask and tick_do_broadcast() expects a valid cpumask and therefor lacks any further checks. Remove the cpu from the tick_broadcast_force_mask before we set the tick device pointer to NULL. Also add a sanity check to the oneshot broadcast function, so we can detect such issues w/o crashing the machine. Reported-by: Prarit Bhargava <prarit@redhat.com> Cc: athorlton@sgi.com Cc: CAI Qian <caiqian@redhat.com> Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1306261303260.4013@ionos.tec.linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'firmware/ositech')
0 files changed, 0 insertions, 0 deletions