diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-18 14:11:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-18 14:11:01 -0500 |
commit | 451bb1a6b2d24df6d677fe790950bec0679b741d (patch) | |
tree | 9d6ff65847c53871c280e55b236165b5f667e315 | |
parent | 98da295b35cf23222b52a3dc1d768b7997c95a32 (diff) | |
parent | c1a9eeb938b5433947e5ea22f89baff3182e7075 (diff) |
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
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
-rw-r--r-- | kernel/time/tick-broadcast.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index f6aae7977824..d2a20e83ebae 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) | |||
871 | { | 871 | { |
872 | int cpu = smp_processor_id(); | 872 | int cpu = smp_processor_id(); |
873 | 873 | ||
874 | if (!bc) | ||
875 | return; | ||
876 | |||
874 | /* Set it up only once ! */ | 877 | /* Set it up only once ! */ |
875 | if (bc->event_handler != tick_handle_oneshot_broadcast) { | 878 | if (bc->event_handler != tick_handle_oneshot_broadcast) { |
876 | int was_periodic = clockevent_state_periodic(bc); | 879 | int was_periodic = clockevent_state_periodic(bc); |