archive mirror
 help / color / mirror / Atom feed
From: Yazen Ghannam <>
	Yazen Ghannam <>,
Subject: [PATCH 2/2] x86/MCE: Don't call kill_me_now() directly
Date: Tue,  4 May 2021 17:47:12 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

From: Yazen Ghannam <>

Always call kill_me_maybe() in order to attempt memory recovery. This
ensures that any memory associated with the error is properly marked as

This is needed for errors that occur on memory, but that do not have
MCG_STATUS[RIPV] set. One example is data poison consumption through the
instruction fetch units on AMD Zen-based systems.

The MF_MUST_KILL flag is passed to memory_failure() when
MCG_STATUS[RIPV] is not set. So the associated process will still be

Cc: <>
Signed-off-by: Yazen Ghannam <>
 arch/x86/kernel/cpu/mce/core.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index 308fb644b94a..9040d45ed997 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -1285,10 +1285,7 @@ static void queue_task_work(struct mce *m, int kill_current_task)
 	current->mce_ripv = !!(m->mcgstatus & MCG_STATUS_RIPV);
 	current->mce_whole_page = whole_page(m);
-	if (kill_current_task)
-		current->mce_kill_me.func = kill_me_now;
-	else
-		current->mce_kill_me.func = kill_me_maybe;
+	current->mce_kill_me.func = kill_me_maybe;
 	task_work_add(current, &current->mce_kill_me, TWA_RESUME);

  parent reply	other threads:[~2021-05-04 17:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-04 17:47 [PATCH 0/2] AMD Zen-based IF Unit Poison Quirk Yazen Ghannam
2021-05-04 17:47 ` [PATCH 1/2] x86/MCE: Always save CS register on AMD Zen IF errors Yazen Ghannam
2021-05-04 17:47 ` Yazen Ghannam [this message]
2021-05-04 18:07   ` [PATCH 2/2] x86/MCE: Don't call kill_me_now() directly Luck, Tony
2021-05-04 18:29     ` Yazen Ghannam

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \

* 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).