From: Andrew Morton <akpm@linux-foundation.org>
To: David Carlier <devnexen@gmail.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
syzkaller-bugs@googlegroups.com, kasong@tencent.com,
bhe@redhat.com, chrisl@kernel.org, baohua@kernel.org,
nphamcs@gmail.com, shikemeng@huaweicloud.com, hughd@google.com,
baolin.wang@linux.alibaba.com,
syzbot+23b25ba3c6bf971f9c57@syzkaller.appspotmail.com
Subject: Re: [PATCH] mm/shmem: don't release a swapin-error marker as a swap entry
Date: Sun, 20 Sep 2026 13:04:33 -0700 [thread overview]
Message-ID: <20260920130433.7c68761144a2a63e2ce32bb4@linux-foundation.org> (raw)
In-Reply-To: <20260920155002.1030454-1-devnexen@gmail.com>
On Sun, 20 Sep 2026 16:50:02 +0100 David Carlier <devnexen@gmail.com> wrote:
> A failed shmem swapin
from -EIO, for example.
> frees the swap slot and leaves a PTE_MARKER_POISONED
> entry in the page cache. On truncate or eviction shmem_free_swap() passes
> that marker to swap_put_entries_direct(), which warns because it is not a
> swap entry. There is nothing left to release either way.
>
> Skip the release for non-swap entries, as every other caller already does.
>
> Reported-by: syzbot+23b25ba3c6bf971f9c57@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=23b25ba3c6bf971f9c57
> Fixes: ac2d3268284b ("mm/swapfile.c: remove the unneeded checking")
> Signed-off-by: David Carlier <devnexen@gmail.com>
I guess we should backport - errors can happen and WARN can crash
machines. What do others think?
next prev parent reply other threads:[~2026-09-20 20:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-20 15:50 [PATCH] mm/shmem: don't release a swapin-error marker as a swap entry David Carlier
2026-09-20 20:04 ` Andrew Morton [this message]
2026-09-21 2:45 ` Baolin Wang
2026-09-22 21:03 ` David CARLIER
2026-09-23 1:34 ` Baolin Wang
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=20260920130433.7c68761144a2a63e2ce32bb4@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=bhe@redhat.com \
--cc=chrisl@kernel.org \
--cc=devnexen@gmail.com \
--cc=hughd@google.com \
--cc=kasong@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nphamcs@gmail.com \
--cc=shikemeng@huaweicloud.com \
--cc=syzbot+23b25ba3c6bf971f9c57@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.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.