[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100510223537.739028196@kvm.kroah.org>
Date: Mon, 10 May 2010 15:34:49 -0700
From: Greg KH <gregkh@...e.de>
To: linux-kernel@...r.kernel.org, stable@...nel.org
Cc: stable-review@...nel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
Tejun Heo <tj@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Paul Mackerras <paulus@....ibm.com>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Ingo Molnar <mingo@...e.hu>
Subject: [37/98] perf: Fix resource leak in failure path of perf_event_open()
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tejun Heo <tj@...nel.org>
commit 048c852051d2bd5da54a4488bc1f16b0fc74c695 upstream.
perf_event_open() kfrees event after init failure which doesn't
release all resources allocated by perf_event_alloc(). Use
free_event() instead.
Signed-off-by: Tejun Heo <tj@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Paul Mackerras <paulus@....ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
LKML-Reference: <4BDBE237.1040809@...nel.org>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
kernel/perf_event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -4609,7 +4609,7 @@ err_fput_free_put_context:
err_free_put_context:
if (err < 0)
- kfree(event);
+ free_event(event);
err_put_context:
if (err < 0)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists