From: Greg KH <gregkh@linuxfoundation.org>
To: luofei <luofei@unicloud.com>
Cc: stable@vger.kernel.org
Subject: Re: [PATCH] x86/mm, mm/hwpoison: fix unmap kernel 1:1 pages
Date: Mon, 7 Feb 2022 09:17:13 +0100 [thread overview]
Message-ID: <YgDVicpKRYOx88P5@kroah.com> (raw)
In-Reply-To: <20220207075023.830571-1-luofei@unicloud.com>
On Mon, Feb 07, 2022 at 02:50:23AM -0500, luofei wrote:
> Only unmap the page when the memory error is properly handled
> by calling memory_failure(), not the other way around.
>
> Fixes: 26f8c38bb466("x86/mm, mm/hwpoison: Don't unconditionally unmap kernel 1:1 pages")
>
> Signed-off-by: luofei <luofei@unicloud.com>
> Cc: stable@vger.kernel.org #v4.14
> ---
> arch/x86/kernel/cpu/mcheck/mce.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
> index 95c09db1bba2..d8399a689165 100644
> --- a/arch/x86/kernel/cpu/mcheck/mce.c
> +++ b/arch/x86/kernel/cpu/mcheck/mce.c
> @@ -589,7 +589,7 @@ static int srao_decode_notifier(struct notifier_block *nb, unsigned long val,
>
> if (mce_usable_address(mce) && (mce->severity == MCE_AO_SEVERITY)) {
> pfn = mce->addr >> PAGE_SHIFT;
> - if (memory_failure(pfn, MCE_VECTOR, 0))
> + if (!memory_failure(pfn, MCE_VECTOR, 0))
> mce_unmap_kpfn(pfn);
> }
>
> --
> 2.27.0
>
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
next prev parent reply other threads:[~2022-02-07 8:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-07 7:50 [PATCH] x86/mm, mm/hwpoison: fix unmap kernel 1:1 pages luofei
2022-02-07 8:17 ` Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-02-07 7:52 luofei
2022-02-07 8:14 ` Greg KH
2022-02-07 9:35 ` Borislav Petkov
2022-02-07 10:00 ` Greg KH
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=YgDVicpKRYOx88P5@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=luofei@unicloud.com \
--cc=stable@vger.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