Re: [PATCH v4 2/2] mm: prevent gup_fast from racing with COW during fork

2020-11-11 Thread Ahmed S. Darwish
On Tue, Nov 10, 2020 at 07:44:09PM -0400, Jason Gunthorpe wrote: ... > > Fixes: f3c64eda3e50 ("mm: avoid early COW write protect games during fork()") > Suggested-by: Linus Torvalds > Link: > https://lore.kernel.org/r/CAHk-=wi=icnycarbpgjkvju9eyyez13n64tzyldob8cp5q_...@mail.gmail.com > Reviewed-b

Re: [PATCH v4 2/2] mm: prevent gup_fast from racing with COW during fork

2020-11-11 Thread Peter Xu
On Tue, Nov 10, 2020 at 07:44:09PM -0400, Jason Gunthorpe wrote: > Since commit 70e806e4e645 ("mm: Do early cow for pinned pages during > fork() for ptes") pages under a FOLL_PIN will not be write protected > during COW for fork. This means that pages returned from > pin_user_pages(FOLL_WRITE) shou