From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Qi Xi <xiqi2@huawei.com>
Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>,
Andrew Morton <akpm@linux-foundation.org>,
Sasha Levin <sashal@kernel.org>,
Miaohe Lin <linmiaohe@huawei.com>, Jane Chu <jane.chu@oracle.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
sunnanyong@huawei.com, wangkefeng.wang@huawei.com,
stable@vger.kernel.org
Subject: Re: [PATCH stable/linux-6.6.y] mm/memory-failure: fix missing ->mf_stats count when hugetlb folio already poisoned
Date: Tue, 21 Jul 2026 15:06:30 +0200 [thread overview]
Message-ID: <2026072112-lapping-turf-bf90@gregkh> (raw)
In-Reply-To: <6a756801-f4a5-44a5-abfd-e9ae57432c56@huawei.com>
On Tue, Jul 14, 2026 at 09:45:03AM +0800, Qi Xi wrote:
> Add stable@ to Cc.
>
> On 06/07/2026 16:41, Qi Xi wrote:
> > When a new subpage is poisoned on a hugetlb folio that has already been
> > marked hwpoison (MF_HUGETLB_FOLIO_PRE_POISONED), hugetlb_update_hwpoison()
> > increments num_poisoned_pages directly, but the per-node ->mf_stats is
> > not updated because this path bypasses action_result(). This leaves the
> > two accounting counters inconsistent within the hardware memory-failure
> > path: a new poison event is counted in num_poisoned_pages but not reflected
> > in the per-node mf_stats.
> >
> > In mainline, commit a148a2040191 ("mm/memory-failure: fix missing
> > ->mf_stats count in hugetlb poison") fixed this by removing the direct
> > num_poisoned_pages_inc() from the helper and adding action_result() calls
> > in try_memory_failure_hugetlb() for the already-poisoned cases. The
> > backport to linux-6.6.y as commit 252bb328b36f ("mm/memory-failure: fix
> > missing ->mf_stats count in hugetlb poison") applied the refactoring
> > (naming, constants, switch-case) but omitted the core counting fix,
> > leaving the inconsistency in place.
> >
> > Fix this by adding a matching update_per_node_mf_stats() call alongside
> > the existing num_poisoned_pages_inc() in the same block, so both counters
> > stay consistent without restructuring the error path.
> >
> > Fixes: 252bb328b36f ("mm/memory-failure: fix missing ->mf_stats count in hugetlb poison")
> > Signed-off-by: Qi Xi <xiqi2@huawei.com>
We need acks/reviews by the relevant maintainers before we can accept
something like this.
thanks,
greg k-h
next prev parent reply other threads:[~2026-07-21 13:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 8:41 [PATCH stable/linux-6.6.y] mm/memory-failure: fix missing ->mf_stats count when hugetlb folio already poisoned Qi Xi
2026-07-14 1:45 ` Qi Xi
2026-07-14 5:11 ` Greg Kroah-Hartman
2026-07-21 13:06 ` Greg Kroah-Hartman [this message]
2026-07-21 13:30 ` Qi Xi
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=2026072112-lapping-turf-bf90@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=jane.chu@oracle.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=naoya.horiguchi@nec.com \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=sunnanyong@huawei.com \
--cc=wangkefeng.wang@huawei.com \
--cc=xiqi2@huawei.com \
/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.