Re: [PATCH v3 2/3] mm: replace vma_start_write() with vma_start_write_killable()

From: Matthew Wilcox

Date: Wed Mar 04 2026 - 14:07:38 EST


On Wed, Mar 04, 2026 at 04:53:27PM +0000, Lorenzo Stoakes (Oracle) wrote:
> On Wed, Mar 04, 2026 at 03:24:05AM +0000, Matthew Wilcox wrote:
> > We could literally return any error code -- it never makes it to
> > userspace. I forget where it is, but if you follow the syscall
> > return to user path, a dying task never makes it to running a single
> > instruction.
>
> Thanks for that Matthew, that makes life easier then.
>
> We can probably replace some of the more horrid if (err == -EINTR) stuff with
> fatal_signal_pending(current) to be clearer as a result.

Umm. Be careful? fatal_signal_pending() may become true at a later
point, so you may have acquired the lock _and_ fatal_signal_pending()
can be true. I'd need to audit a patch to be sure that it's a
reasonable replacement.