From: Libing Zhou <libing.zhou@nokia-sbell.com>
To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, bp@suse.de,
x86@kernel.org
Cc: linux-kernel@vger.kernel.org, libing.zhou@nokia-sbell.com, hpa@zytor.com
Subject: [PATCH] x86/nmi: Fix nmi_handle duration miscalculation
Date: Mon, 17 Aug 2020 17:04:41 +0800 [thread overview]
Message-ID: <20200817090441.44501-1-libing.zhou@nokia-sbell.com> (raw)
In nmi_check_duration(), the 'whole_msecs' value should
get from 'duration' to reflect actual time duration,
but not 'action->max_duration'.
Signed-off-by: Libing Zhou <libing.zhou@nokia-sbell.com>
---
arch/x86/kernel/nmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
index 4fc9954a9560..c51ee659e520 100644
--- a/arch/x86/kernel/nmi.c
+++ b/arch/x86/kernel/nmi.c
@@ -102,7 +102,7 @@ fs_initcall(nmi_warning_debugfs);
static void nmi_check_duration(struct nmiaction *action, u64 duration)
{
- u64 whole_msecs = READ_ONCE(action->max_duration);
+ u64 whole_msecs = duration;
int remainder_ns, decimal_msecs;
if (duration < nmi_longest_ns || duration < action->max_duration)
--
2.22.0
next reply other threads:[~2020-08-17 9:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-17 9:04 Libing Zhou [this message]
2020-08-19 8:06 ` peterz
2020-08-20 2:31 ` Zhou, Libing (NSB - CN/Hangzhou)
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=20200817090441.44501-1-libing.zhou@nokia-sbell.com \
--to=libing.zhou@nokia-sbell.com \
--cc=bp@alien8.de \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®