projects/linux·commit 451bb1a6

Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

451bb1a6 · Linus Torvalds <[email protected]> · 2016-12-18 11:11:01 -08:00

Pull timer fix from Thomas Gleixner:
 "Prevent NULL pointer dereferencing in the tick broadcast code. Old
  bug, which got unearthed by the hotplug ordering problem"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  tick/broadcast: Prevent NULL pointer dereference
Commit
451bb1a6b2d24df6d677fe790950bec0679b741d
Parents
98da295b · c1a9eeb9

Merge commit. Changes below are compared with the first parent: 98da295b.

Changes

1 files changed · +3 −0

FileStatusAddDelContent
kernel/time/tick-broadcast.cmodified+3−0View file

kernel/time/tick-broadcast.c

View file
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index f6aae79..d2a20e8 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -871,6 +871,9 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
{
int cpu = smp_processor_id();
+ if (!bc)
+ return;
+
/* Set it up only once ! */
if (bc->event_handler != tick_handle_oneshot_broadcast) {
int was_periodic = clockevent_state_periodic(bc);