Re: [PATCH v3 2/2] mm: fail the fault on a malformed swap entry instead of retrying it

Nhat Pham <[email protected]>
Newsgroups org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <CAKEwX=O7qQc1naHEjvUOW-d7CgA_+9Am_0jW1Y3NCe714xXtPg@mail.gmail.com>
On Tue, Aug 18, 2026 at 3:08 AM Breno Leitao <[email protected]> wrote:
>
> do_swap_page() returns 0 when get_swap_device() fails, which the fault
> handler reads as "handled". For an entry that can never become valid
> the retry takes the same fault again, so the thread spins forever,
> retrying on the same fault.
>
> Return VM_FAULT_SIGBUS (Bad access) for a malformed entry (pr_err() was
> called at get_swap_device()).
>
> Acked-by: Kairui Song <[email protected]>
> Reviewed-by: Barry Song <[email protected]>
> Signed-off-by: Breno Leitao <[email protected]>

Reviewed-by: Nhat Pham <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.