diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-22 13:11:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-22 13:11:47 -0400 |
commit | c57c3743784e08d8ceaaea928a8c84ad8b403aed (patch) | |
tree | e250cfd7f86979ed67e3bb5550f21799b5d82e55 /kernel | |
parent | 5b26776bd9253931097a85dcb1b9da1bac554c02 (diff) | |
parent | 79ef2bb01445400def20c7993b27fbcad27ca95f (diff) |
Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
clocksource: Prevent NULL pointer dereference
timer: Avoid reading uninitialized data
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/time/clocksource.c | 2 | ||||
-rw-r--r-- | kernel/timer.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 592bf584d1d2..7466cb811251 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c | |||
@@ -513,7 +513,7 @@ static ssize_t sysfs_override_clocksource(struct sys_device *dev, | |||
513 | * Check to make sure we don't switch to a non-highres capable | 513 | * Check to make sure we don't switch to a non-highres capable |
514 | * clocksource if the tick code is in oneshot mode (highres or nohz) | 514 | * clocksource if the tick code is in oneshot mode (highres or nohz) |
515 | */ | 515 | */ |
516 | if (tick_oneshot_mode_active() && | 516 | if (tick_oneshot_mode_active() && ovr && |
517 | !(ovr->flags & CLOCK_SOURCE_VALID_FOR_HRES)) { | 517 | !(ovr->flags & CLOCK_SOURCE_VALID_FOR_HRES)) { |
518 | printk(KERN_WARNING "%s clocksource is not HRT compatible. " | 518 | printk(KERN_WARNING "%s clocksource is not HRT compatible. " |
519 | "Cannot switch while in HRT/NOHZ mode\n", ovr->name); | 519 | "Cannot switch while in HRT/NOHZ mode\n", ovr->name); |
diff --git a/kernel/timer.c b/kernel/timer.c index 0b36b9e5cc8b..a7f07d5a6241 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -714,7 +714,7 @@ int mod_timer(struct timer_list *timer, unsigned long expires) | |||
714 | * networking code - if the timer is re-modified | 714 | * networking code - if the timer is re-modified |
715 | * to be the same thing then just return: | 715 | * to be the same thing then just return: |
716 | */ | 716 | */ |
717 | if (timer->expires == expires && timer_pending(timer)) | 717 | if (timer_pending(timer) && timer->expires == expires) |
718 | return 1; | 718 | return 1; |
719 | 719 | ||
720 | return __mod_timer(timer, expires, false, TIMER_NOT_PINNED); | 720 | return __mod_timer(timer, expires, false, TIMER_NOT_PINNED); |