History

Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf: Fix task_struct reference leak perf: Fix task context scheduling perf: mmap 512 kiB by default perf: Rebase max unprivileged mlock threshold on top of page size perf tools: Fix NO_NEWT=1 python build error perf symbols: Properly align symbol_conf.priv_size perf tools: Emit clearer message for sys_perf_event_open ENOENT return perf tools: Fixup exit path when not able to open events perf symbols: Fix vsyscall symbol lookup oprofile, x86: Allow setting EDGE/INV/CMASK for counter events

Linus Torvalds committed 15 years ago

Commit 4da7e902 parents fb9a7d7 fd1edb312 files · +91 −28Browse files

Showing the changes to kernel (1 of 12 files). Show all

Unified · Split

kernel/perf_event.c+7−2
@@ -145,8 +145,8 @@ static struct srcu_struct pmus_srcu; · 144 unmodified lines
145145 */
146146 int sysctl_perf_event_paranoid __read_mostly = 1;
147147
148−/* Minimum for 128 pages + 1 for the user control page */
149−int sysctl_perf_event_mlock __read_mostly = 516; /* 'free' kb per user */
148+/* Minimum for 512 kiB + 1 user control page */
149+int sysctl_perf_event_mlock __read_mostly = 512 + (PAGE_SIZE / 1024); /* 'free' kiB per user */
150150
151151 /*
152152 * max perf event sample rate
@@ -6531,6 +6531,11 @@ SYSCALL_DEFINE5(perf_event_open, · 6378 unmodified lines
65316531 goto err_alloc;
65326532 }
65336533
6534+ if (task) {
6535+ put_task_struct(task);
6536+ task = NULL;
6537+ }
6538+
65346539 /*
65356540 * Look up the group leader (we will attach this event to it):
65366541 */