Skip to content

Commit

Permalink
hrtimer: Handle failure of tick_init_highres() gracefully
Browse files Browse the repository at this point in the history
Commit 75e3b37 ("hrtimer: Drop return code of hrtimer_switch_to_hres()")
drops the return code of hrtimer_switch_to_hres(). While doing so, it also
drops the return statement itself on failure. This may cause a system hang.
Seen when running arm:multi_v7_defconfig in qemu with devicetree file
vexpress-v2p-ca9.

Fixes: 75e3b37 ("hrtimer: Drop return code of hrtimer_switch_to_hres()")
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Link: http://lkml.kernel.org/r/1440231047-16256-1-git-send-email-linux@roeck-us.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Guenter Roeck authored and Thomas Gleixner committed Aug 22, 2015
1 parent 05ddaa4 commit 85e1cd6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/time/hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@ static void hrtimer_switch_to_hres(void)
if (tick_init_highres()) {
printk(KERN_WARNING "Could not switch to high resolution "
"mode on CPU %d\n", base->cpu);
return;
}
base->hres_active = 1;
hrtimer_resolution = HIGH_RES_NSEC;
Expand Down

0 comments on commit 85e1cd6

Please sign in to comment.