From: Qais Yousef <qais.yousef@arm.com>
To: Petr Mladek <pmladek@suse.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>,
John Ogness <john.ogness@linutronix.de>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
linux-kernel@vger.kernel.org, Qais Yousef <qais.yousef@arm.com>
Subject: [PATCH 2/2] hrtimer: Use pr_warn_deferred_once() in hrtimer_interrupt()
Date: Sat, 23 Jan 2021 23:37:41 +0000 [thread overview]
Message-ID: <20210123233741.3614408-3-qais.yousef@arm.com> (raw)
In-Reply-To: <20210123233741.3614408-1-qais.yousef@arm.com>
printk is not allowed in this context and causes a BUG: Invalid wait context.
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
---
kernel/time/hrtimer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 743c852e10f2..2d9b7cf1d5e2 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1700,7 +1700,8 @@ void hrtimer_interrupt(struct clock_event_device *dev)
else
expires_next = ktime_add(now, delta);
tick_program_event(expires_next, 1);
- pr_warn_once("hrtimer: interrupt took %llu ns\n", ktime_to_ns(delta));
+ pr_warn_deferred_once("hrtimer: interrupt took %llu ns\n",
+ ktime_to_ns(delta));
}
/* called with interrupts disabled */
--
2.25.1
next prev parent reply other threads:[~2021-01-23 23:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-23 23:37 [PATCH 0/2] Fix BUG: Invalid wait context in hrtimer_interrupt() Qais Yousef
2021-01-23 23:37 ` [PATCH 1/2] printk: Add new pr_*_deferred_once() variants Qais Yousef
2021-01-25 10:37 ` Peter Zijlstra
2021-01-25 10:58 ` John Ogness
2021-01-25 19:46 ` Qais Yousef
2022-01-11 13:40 ` Andy Shevchenko
2022-01-13 11:20 ` Qais Yousef
2021-01-23 23:37 ` Qais Yousef [this message]
2021-01-26 4:46 ` [PATCH 0/2] Fix BUG: Invalid wait context in hrtimer_interrupt() Sergey Senozhatsky
2021-01-26 14:59 ` Qais Yousef
2021-01-26 15:22 ` John Ogness
2021-01-26 16:18 ` Peter Zijlstra
2021-01-26 15:58 ` Sergey Senozhatsky
2021-01-26 16:23 ` Peter Zijlstra
2021-01-26 18:08 ` Qais Yousef
2021-01-26 16:58 ` Petr Mladek
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=20210123233741.3614408-3-qais.yousef@arm.com \
--to=qais.yousef@arm.com \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).