Re: [PATCH] mm/shmem: don't release a swapin-error marker as a swap entry
From: Andrew Morton
Date: Sun Sep 20 2026 - 16:04:39 EST
On Sun, 20 Sep 2026 16:50:02 +0100 David Carlier <devnexen@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxxxxxx
> Closes: https://syzkaller.appspot.com/bug?extid=23b25ba3c6bf971f9c57
> Fixes: ac2d3268284b ("mm/swapfile.c: remove the unneeded checking")
> Signed-off-by: David Carlier <devnexen@xxxxxxxxx>
I guess we should backport - errors can happen and WARN can crash
machines. What do others think?