This is a note to let you know that I've just added the patch titled
perf: Fix task_struct reference leak
to the 2.6.38-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
perf-fix-task_struct-reference-leak.patch
and it can be found in the queue-2.6.38 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From fd1edb3aa2c1d92618d8f0c6d15d44ea41fcac6a Mon Sep 17 00:00:00 2001
From: Peter Zijlstra <[email protected]>
Date: Mon, 28 Mar 2011 13:13:56 +0200
Subject: perf: Fix task_struct reference leak
From: Peter Zijlstra <[email protected]>
commit fd1edb3aa2c1d92618d8f0c6d15d44ea41fcac6a upstream.
sys_perf_event_open() had an imbalance in the number of task refs it
took causing memory leakage
Cc: Jiri Olsa <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
kernel/perf_event.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -5917,6 +5917,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):
*/
Patches currently in stable-queue which might be from [email protected] are
queue-2.6.38/perf-better-fit-max-unprivileged-mlock-pages-for-tools-needs.patch
queue-2.6.38/perf-fix-task_struct-reference-leak.patch
queue-2.6.38/perf-rebase-max-unprivileged-mlock-threshold-on-top-of-page-size.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable