diff options
-rw-r--r-- | kernel/fork.c | 4 | ||||
-rw-r--r-- | mm/mmap.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index f00e319d8376..f9d0499c2d27 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -459,8 +459,8 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm) if (retval) goto out; - if (file && uprobe_mmap(tmp)) - goto out; + if (file) + uprobe_mmap(tmp); } /* a new mm has just been created */ arch_dup_mmap(oldmm, mm); diff --git a/mm/mmap.c b/mm/mmap.c index 3edfcdfa42d9..fa1f274db11a 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1355,9 +1355,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; |