public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] hrtimer: Fix hang seen if tick_init_highres() failed
@ 2015-08-22  8:10 Guenter Roeck
  2015-08-22  9:00 ` [tip:timers/core] hrtimer: Handle failure of tick_init_highres() gracefully tip-bot for Guenter Roeck
  2015-08-22 21:25 ` [PATCH -next] hrtimer: Fix hang seen if tick_init_highres() failed Luiz Capitulino
  0 siblings, 2 replies; 3+ messages in thread
From: Guenter Roeck @ 2015-08-22  8:10 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-kernel, Guenter Roeck, Luiz Capitulino

Commit 75e3b37d0598 ("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: 75e3b37d0598 ("hrtimer: Drop return code of hrtimer_switch_to_hres()")
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 kernel/time/hrtimer.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 5c4fe50e47d3..457a373e2181 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -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;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-08-22 21:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-22  8:10 [PATCH -next] hrtimer: Fix hang seen if tick_init_highres() failed Guenter Roeck
2015-08-22  9:00 ` [tip:timers/core] hrtimer: Handle failure of tick_init_highres() gracefully tip-bot for Guenter Roeck
2015-08-22 21:25 ` [PATCH -next] hrtimer: Fix hang seen if tick_init_highres() failed Luiz Capitulino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox