[PATCH 22/23] userfaultfd: avoid mmap_sem read recursion in mcopy_atomic

2015-05-14 Thread Andrea Arcangeli
If the rwsem starves writers it wasn't strictly a bug but lockdep doesn't like it and this avoids depending on lowlevel implementation details of the lock. Signed-off-by: Andrea Arcangeli --- mm/userfaultfd.c | 92 1 file changed, 66 inser

Re: [PATCH 22/23] userfaultfd: avoid mmap_sem read recursion in mcopy_atomic

2015-05-22 Thread Andrew Morton
On Thu, 14 May 2015 19:31:19 +0200 Andrea Arcangeli wrote: > If the rwsem starves writers it wasn't strictly a bug but lockdep > doesn't like it and this avoids depending on lowlevel implementation > details of the lock. > > ... > > @@ -229,13 +246,33 @@ static __always_inline ssize_t __mcopy_at

Re: [PATCH 22/23] userfaultfd: avoid mmap_sem read recursion in mcopy_atomic

2015-05-22 Thread Andrea Arcangeli
On Fri, May 22, 2015 at 01:18:22PM -0700, Andrew Morton wrote: > On Thu, 14 May 2015 19:31:19 +0200 Andrea Arcangeli > wrote: > > > If the rwsem starves writers it wasn't strictly a bug but lockdep > > doesn't like it and this avoids depending on lowlevel implementation > > details of the lock.

Re: [PATCH 22/23] userfaultfd: avoid mmap_sem read recursion in mcopy_atomic

2015-05-22 Thread Andrew Morton
There's a more serious failure with i386 allmodconfig: fs/userfaultfd.c:145:2: note: in expansion of macro 'BUILD_BUG_ON' BUILD_BUG_ON(sizeof(struct uffd_msg) != 32); I'm surprised the feature is even reachable on i386 builds? -- To unsubscribe from this list: send the line "unsubscribe linux-

Re: [PATCH 22/23] userfaultfd: avoid mmap_sem read recursion in mcopy_atomic

2015-05-22 Thread Andrea Arcangeli
On Fri, May 22, 2015 at 02:18:30PM -0700, Andrew Morton wrote: > > There's a more serious failure with i386 allmodconfig: > > fs/userfaultfd.c:145:2: note: in expansion of macro 'BUILD_BUG_ON' > BUILD_BUG_ON(sizeof(struct uffd_msg) != 32); > > I'm surprised the feature is even reachable on i38