Skip to content

Commit 85e1cd6

Browse files
groeckKAGA-KOKO
authored andcommitted
hrtimer: Handle failure of tick_init_highres() gracefully
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 <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
1 parent 05ddaa4 commit 85e1cd6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/time/hrtimer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,7 @@ static void hrtimer_switch_to_hres(void)
695695
if (tick_init_highres()) {
696696
printk(KERN_WARNING "Could not switch to high resolution "
697697
"mode on CPU %d\n", base->cpu);
698+
return;
698699
}
699700
base->hres_active = 1;
700701
hrtimer_resolution = HIGH_RES_NSEC;

0 commit comments

Comments
 (0)