diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/time/timer_stats.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/time/timer_stats.c b/kernel/time/timer_stats.c index fa3d380ca8c0..321693724ad7 100644 --- a/kernel/time/timer_stats.c +++ b/kernel/time/timer_stats.c @@ -236,10 +236,15 @@ void timer_stats_update_stats(void *timer, pid_t pid, void *startf, /* * It doesnt matter which lock we take: */ - spinlock_t *lock = &per_cpu(lookup_lock, raw_smp_processor_id()); + spinlock_t *lock; struct entry *entry, input; unsigned long flags; + if (likely(!active)) + return; + + lock = &per_cpu(lookup_lock, raw_smp_processor_id()); + input.timer = timer; input.start_func = startf; input.expire_func = timerf; |