Re: [PATCH RESEND v3] mm/userfaultfd: fix memory corruption due to writeprotect

2021-03-03 Thread Nadav Amit
> On Mar 3, 2021, at 11:03 AM, Peter Xu wrote: > > On Wed, Mar 03, 2021 at 01:57:02AM -0800, Nadav Amit wrote: >> From: Nadav Amit >> >> Userfaultfd self-test fails occasionally, indicating a memory >> corruption. > > It's failing very constantly now for me after I got it run on a 40 cores >

Re: [PATCH RESEND v3] mm/userfaultfd: fix memory corruption due to writeprotect

2021-03-03 Thread Peter Xu
On Wed, Mar 03, 2021 at 01:57:02AM -0800, Nadav Amit wrote: > From: Nadav Amit > > Userfaultfd self-test fails occasionally, indicating a memory > corruption. It's failing very constantly now for me after I got it run on a 40 cores system... While indeed not easy to fail on my laptop. [...] >

[PATCH RESEND v3] mm/userfaultfd: fix memory corruption due to writeprotect

2021-03-03 Thread Nadav Amit
From: Nadav Amit Userfaultfd self-test fails occasionally, indicating a memory corruption. Analyzing this problem indicates that there is a real bug since mmap_lock is only taken for read in mwriteprotect_range() and defers flushes, and since there is insufficient consideration of concurrent def