From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:58709 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932349AbcEBXb3 (ORCPT ); Mon, 2 May 2016 19:31:29 -0400 Subject: Patch "perf/core: Don't leak event in the syscall error path" has been added to the 4.5-stable tree To: alexander.shishkin@linux.intel.com, acme@kernel.org, acme@redhat.com, chianglungyu@gmail.com, eranian@google.com, gregkh@linuxfoundation.org, jolsa@redhat.com, mingo@kernel.org, peterz@infradead.org, tglx@linutronix.de, torvalds@linux-foundation.org, vincent.weaver@maine.edu Cc: , From: Date: Mon, 02 May 2016 16:31:28 -0700 Message-ID: <1462231888245227@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled perf/core: Don't leak event in the syscall error path to the 4.5-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-core-don-t-leak-event-in-the-syscall-error-path.patch and it can be found in the queue-4.5 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 201c2f85bd0bc13b712d9c0b3d11251b182e06ae Mon Sep 17 00:00:00 2001 From: Alexander Shishkin Date: Mon, 21 Mar 2016 10:02:42 +0200 Subject: perf/core: Don't leak event in the syscall error path From: Alexander Shishkin commit 201c2f85bd0bc13b712d9c0b3d11251b182e06ae upstream. In the error path, event_file not being NULL is used to determine whether the event itself still needs to be free'd, so fix it up to avoid leaking. Reported-by: Leon Yu Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Fixes: 130056275ade ("perf: Do not double free") Link: http://lkml.kernel.org/r/87twk06yxp.fsf@ashishki-desk.ger.corp.intel.com Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- kernel/events/core.c | 1 + 1 file changed, 1 insertion(+) --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -8479,6 +8479,7 @@ SYSCALL_DEFINE5(perf_event_open, f_flags); if (IS_ERR(event_file)) { err = PTR_ERR(event_file); + event_file = NULL; goto err_context; } Patches currently in stable-queue which might be from alexander.shishkin@linux.intel.com are queue-4.5/perf-core-fix-time-tracking-bug-with-multiplexing.patch queue-4.5/perf-stat-document-detailed-option.patch queue-4.5/perf-core-don-t-leak-event-in-the-syscall-error-path.patch