summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-04-04 08:36:40 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-04-04 08:36:40 -0700
commit4da7e90e653d67dfd405868246d316b04852e2d5 (patch)
tree735707a0b9f0c212776717ec8bc95735ff6a1d01 /kernel
parentfb9a7d76da108d120efb2258ea83b18dbbb2ecdd (diff)
parentfd1edb3aa2c1d92618d8f0c6d15d44ea41fcac6a (diff)
downloadlinux-4da7e90e653d67dfd405868246d316b04852e2d5.tar.bz2
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
Diffstat (limited to 'kernel')
-rw-r--r--kernel/perf_event.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index c75925c4d1e2..27960f114efd 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -145,8 +145,8 @@ static struct srcu_struct pmus_srcu;
*/
int sysctl_perf_event_paranoid __read_mostly = 1;
-/* Minimum for 128 pages + 1 for the user control page */
-int sysctl_perf_event_mlock __read_mostly = 516; /* 'free' kb per user */
+/* Minimum for 512 kiB + 1 user control page */
+int sysctl_perf_event_mlock __read_mostly = 512 + (PAGE_SIZE / 1024); /* 'free' kiB per user */
/*
* max perf event sample rate
@@ -6531,6 +6531,11 @@ SYSCALL_DEFINE5(perf_event_open,
goto err_alloc;
}
+ if (task) {
+ put_task_struct(task);
+ task = NULL;
+ }
+
/*
* Look up the group leader (we will attach this event to it):
*/