Skip to content

Commit 7ca63ee

Browse files
committed
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar: "This tree contains misc fixlets: a perf script python binding fix, a uprobes fix and a syscall tracing fix." * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf tools: Add missing files to build the python binding uprobes: Fix mmap_region()'s mm->mm_rb corruption if uprobe_mmap() fails tracing/syscalls: Fix perf syscall tracing when syscall_nr == -1
2 parents caf1aaf + f5042d0 commit 7ca63ee

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

kernel/fork.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,8 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
455455
if (retval)
456456
goto out;
457457

458-
if (file && uprobe_mmap(tmp))
459-
goto out;
458+
if (file)
459+
uprobe_mmap(tmp);
460460
}
461461
/* a new mm has just been created */
462462
arch_dup_mmap(oldmm, mm);

kernel/trace/trace_syscalls.c

+4
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,8 @@ static void perf_syscall_enter(void *ignore, struct pt_regs *regs, long id)
506506
int size;
507507

508508
syscall_nr = syscall_get_nr(current, regs);
509+
if (syscall_nr < 0)
510+
return;
509511
if (!test_bit(syscall_nr, enabled_perf_enter_syscalls))
510512
return;
511513

@@ -580,6 +582,8 @@ static void perf_syscall_exit(void *ignore, struct pt_regs *regs, long ret)
580582
int size;
581583

582584
syscall_nr = syscall_get_nr(current, regs);
585+
if (syscall_nr < 0)
586+
return;
583587
if (!test_bit(syscall_nr, enabled_perf_exit_syscalls))
584588
return;
585589

mm/mmap.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -1356,9 +1356,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
13561356
} else if ((flags & MAP_POPULATE) && !(flags & MAP_NONBLOCK))
13571357
make_pages_present(addr, addr + len);
13581358

1359-
if (file && uprobe_mmap(vma))
1360-
/* matching probes but cannot insert */
1361-
goto unmap_and_free_vma;
1359+
if (file)
1360+
uprobe_mmap(vma);
13621361

13631362
return addr;
13641363

tools/perf/util/python-ext-sources

+2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ util/ctype.c
1010
util/evlist.c
1111
util/evsel.c
1212
util/cpumap.c
13+
util/hweight.c
1314
util/thread_map.c
1415
util/util.c
1516
util/xyarray.c
1617
util/cgroup.c
1718
util/debugfs.c
19+
util/rblist.c
1820
util/strlist.c
1921
../../lib/rbtree.c

0 commit comments

Comments
 (0)