From: tip-bot for Guenter Roeck <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org,
lcapitulino@redhat.com, mingo@kernel.org, hpa@zytor.com,
linux@roeck-us.net
Subject: [tip:timers/core] hrtimer: Handle failure of tick_init_highres() gracefully
Date: Sat, 22 Aug 2015 02:00:49 -0700 [thread overview]
Message-ID: <tip-85e1cd6e769dfc84995270d0a4838021fcb8602d@git.kernel.org> (raw)
In-Reply-To: <1440231047-16256-1-git-send-email-linux@roeck-us.net>
Commit-ID: 85e1cd6e769dfc84995270d0a4838021fcb8602d
Gitweb: http://git.kernel.org/tip/85e1cd6e769dfc84995270d0a4838021fcb8602d
Author: Guenter Roeck <linux@roeck-us.net>
AuthorDate: Sat, 22 Aug 2015 01:10:47 -0700
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Sat, 22 Aug 2015 10:57:50 +0200
hrtimer: Handle failure of tick_init_highres() gracefully
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>
Link: http://lkml.kernel.org/r/1440231047-16256-1-git-send-email-linux@roeck-us.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/time/hrtimer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 5c4fe50..457a373 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;
next prev parent reply other threads:[~2015-08-22 9:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-22 8:10 [PATCH -next] hrtimer: Fix hang seen if tick_init_highres() failed Guenter Roeck
2015-08-22 9:00 ` tip-bot for Guenter Roeck [this message]
2015-08-22 21:25 ` Luiz Capitulino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-85e1cd6e769dfc84995270d0a4838021fcb8602d@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=lcapitulino@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.