uprobes: Fix mmap_region()'s mm->mm_rb corruption if uprobe_mmap() fails
[firefly-linux-kernel-4.4.55.git] / mm / mmap.c
index e3e86914f11ad7d664ec73e08c98ee5670ef8e16..52e08fc9186d08250fa6bd7b0ac8377c49d2076b 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1356,9 +1356,8 @@ out:
        } else if ((flags & MAP_POPULATE) && !(flags & MAP_NONBLOCK))
                make_pages_present(addr, addr + len);
 
-       if (file && uprobe_mmap(vma))
-               /* matching probes but cannot insert */
-               goto unmap_and_free_vma;
+       if (file)
+               uprobe_mmap(vma);
 
        return addr;