linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>,
	Breno Leitao <leitao@debian.org>
Cc: Chris Li <chrisl@kernel.org>, Kairui Song <kasong@tencent.com>,
	Kemeng Shi <shikemeng@huaweicloud.com>,
	Nhat Pham <nphamcs@gmail.com>, Baoquan He <baoquan.he@linux.dev>,
	Barry Song <baohua@kernel.org>,
	Youngjun Park <youngjun.park@lge.com>,
	Miaohe Lin <linmiaohe@huawei.com>,
	Oscar Salvador <osalvador@suse.de>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com, stable@vger.kernel.org
Subject: Re: [PATCH] mm, swap: ratelimit bad swap entry reports
Date: Wed, 19 Aug 2026 10:01:41 +0200	[thread overview]
Message-ID: <e20c1640-5fcd-4c42-afb3-70476166d684@kernel.org> (raw)
In-Reply-To: <20260818122844.71988535d6380ba67e8a2b1a@linux-foundation.org>

On 8/18/26 21:28, Andrew Morton wrote:
> On Tue, 18 Aug 2026 02:03:40 -0700 Breno Leitao <leitao@debian.org> wrote:
> 
>> A corrupt page table hands the same bogus entry to get_swap_device() on
>> every access to the mapping, and every rejection is logged. One machine
>> logged 6185620 copies of the same line in a few hours.
>>
>> swap_dup_entry_direct() prints the same message from the fork path, once
>> per call: the WARN_ON_ONCE() guarding it warns once, the pr_err() inside
>> does not.
>>
>> Rate limit all three prints.
> 
> Sashiko suggests that ratelimiting these might cause pre-existing
> problems to become worse:
> 	https://sashiko.dev/#/patchset/20260818-swap_part_one-v1-1-a4fc58119fc0@debian.org
> 

The fist problem it raises is actually fixed by the other patchset this was
split off from.

I didn't look into the other case.

> The problem it's identifying does require that unrelated things go
> wrong first - 

As described above: "A corrupt page table hands the same bogus entry to
get_swap_device()", that requires something in the caller to go wrong (page
table corruption, similar to how we handle it in other places for present ptes)


-- 
Cheers,

David


      reply	other threads:[~2026-08-19  8:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18  9:03 [PATCH] mm, swap: ratelimit bad swap entry reports Breno Leitao
2026-08-18 17:20 ` David Hildenbrand (Arm)
2026-08-18 19:28 ` Andrew Morton
2026-08-19  8:01   ` David Hildenbrand (Arm) [this message]

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=e20c1640-5fcd-4c42-afb3-70476166d684@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=baoquan.he@linux.dev \
    --cc=chrisl@kernel.org \
    --cc=kasong@tencent.com \
    --cc=kernel-team@meta.com \
    --cc=leitao@debian.org \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nphamcs@gmail.com \
    --cc=osalvador@suse.de \
    --cc=shikemeng@huaweicloud.com \
    --cc=stable@vger.kernel.org \
    --cc=youngjun.park@lge.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 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).