Skip to contentSkip to conversation

timer fix for 4.10

GIT PULL Thomas Gleixner 1 participant 1 message Dec 18, 2016 Nohz, dynticks support

lore
Share & tools
lore
#0 lore raw

Linus,

please pull the latest timers-urgent-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-urgent-for-linus

Prevent NULL pointer dereferencing in the tick broadcast code. Old bug, which got unearthed by the hotplug ordering problem.

Thanks,

tglx

------------------>
Thomas Gleixner (1):
tick/broadcast: Prevent NULL pointer dereference

 kernel/time/tick-broadcast.c | 3 +++
 1 file changed, 3 insertions(+)
kernel/time/tick-broadcast.c +3 -0
index f6aae7977824..d2a20e83ebae 100644
@@ -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);