summaryrefslogtreecommitdiffstats
path: root/kernel/perf_event.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-05-02 10:41:40 +0200
committerTakashi Iwai <tiwai@suse.de>2011-05-02 10:41:40 +0200
commita3ea8e8f2474c35b4c3e22262991afddb93c4c0e (patch)
tree648bbeea304950d02e71863673be8154a5e491f6 /kernel/perf_event.c
parentc2de187e5b0f25b572ac1cb6cdf383f16123717d (diff)
parentebb47241ea0eac6a5a23404821a2d62f64c68496 (diff)
downloadlinux-a3ea8e8f2474c35b4c3e22262991afddb93c4c0e.tar.gz
linux-a3ea8e8f2474c35b4c3e22262991afddb93c4c0e.tar.bz2
linux-a3ea8e8f2474c35b4c3e22262991afddb93c4c0e.zip
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'kernel/perf_event.c')
-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):
*/