Re: [PATCH v3 2/2] mm: fail the fault on a malformed swap entry instead of retrying it
Nhat Pham <[email protected]>
| Newsgroups | gmane.linux.kernel,gmane.linux.kernel.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]>