Messages in this thread | | | From | Linus Torvalds <> | Date | Wed, 11 Nov 2020 10:27:29 -0800 | Subject | Re: [PATCH v4 0/2] Add a seqcount between gup_fast and copy_page_range() |
| |
On Tue, Nov 10, 2020 at 3:44 PM Jason Gunthorpe <jgg@nvidia.com> wrote: > > As discussed and suggested by Linus use a seqcount to close the small race > between gup_fast and copy_page_range(). > > Ahmed confirms that raw_write_seqcount_begin() is the correct API to use > in this case and it doesn't trigger any lockdeps. > > I was able to test it using two threads, one forking and the other using > ibv_reg_mr() to trigger GUP fast. Modifying copy_page_range() to sleep > made the window large enough to reliably hit to test the logic.
Looks all good to me.
Linus
| |