fixup! userfaultfd: non-cooperative: add event for memory unmaps
Subsystems (2)
PATCH 1/1 fixup! userfaultfd: non-cooperative: add event for memory unmaps
The prototypes for MMU-based machines and MMU-less builds have to be the same, this fixes the build errors I saw:
mm/nommu.c:1201:15: error: conflicting types for 'do_mmap' mm/nommu.c:1580:5: error: conflicting types for 'do_munmap'
Fixes mmtom ("userfaultfd: non-cooperative: add event for memory unmaps")
Signed-off-by Arnd Bergmann <[email protected]>
--- ipc/shm.c | 2 +- mm/nommu.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-)
ipc/shm.c +1 -1
@@ -1370,7 +1370,7 @@ SYSCALL_DEFINE1(shmdt, char __user *, shmaddr)* given */ if (vma && vma->vm_start == addr && vma->vm_ops == &shm_vm_ops) { -do_munmap (mm, vma->vm_start, vma->vm_end - vma->vm_start); +do_munmap (mm, vma->vm_start, vma->vm_end - vma->vm_start,NULL ); retval =0 ; }
mm/nommu.c +4 -3
@@ -1205,7 +1205,8 @@ unsigned long do_mmap(struct file *file,unsigned long flags, vm_flags_t vm_flags, unsigned long pgoff, - unsigned long *populate) + unsigned long *populate, + struct list_head *uf) { struct vm_area_struct *vma;struct vm_region *region;
@@ -1577,7 +1578,7 @@ static int shrink_vma(struct mm_struct *mm,* - under NOMMU conditions the chunk to be unmapped must be backed by a single * VMA, though it need not cover the whole VMA */ -int do_munmap (struct mm_struct *mm,unsigned long start,size_t len) +int do_munmap (struct mm_struct *mm,unsigned long start,size_t len,struct list_head *uf) {struct vm_area_struct *vma;unsigned long end;
@@ -1643,7 +1644,7 @@ int vm_munmap(unsigned long addr, size_t len)int ret;down_write (&mm->mmap_sem); - ret =do_munmap (mm, addr, len); + ret =do_munmap (mm, addr, len,NULL );up_write (&mm->mmap_sem);return ret; }
Signature · 1 line
2.9.0