clockevent: Don't remove broadcast device when cpu is dead
authorXiaotian Feng <dfeng@redhat.com>
Thu, 7 Jan 2010 03:22:44 +0000 (11:22 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 28 Jan 2010 23:00:22 +0000 (15:00 -0800)
commit08b8ff44354d5550d90eafd6cde87cb9f1d0ebcb
tree6904774f94f3cc195e5718f36fc009d3d5884dd0
parentf584d374f2ab8cbc348ad23ecb82b419c0b8705c
clockevent: Don't remove broadcast device when cpu is dead

commit ea9d8e3f45404d411c00ae67b45cc35c58265bb7 upstream.

Marc reported that the BUG_ON in clockevents_notify() triggers on his
system. This happens because the kernel tries to remove an active
clock event device (used for broadcasting) from the device list.

The handling of devices which can be used as per cpu device and as a
global broadcast device is suboptimal.

The simplest solution for now (and for stable) is to check whether the
device is used as global broadcast device, but this needs to be
revisited.

[ tglx: restored the cpuweight check and massaged the changelog ]

Reported-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
LKML-Reference: <1262834564-13033-1-git-send-email-dfeng@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/time/clockevents.c