From patchwork Wed Sep 1 09:41:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Zijlstra X-Patchwork-Id: 146581 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o819gJvr006665 for ; Wed, 1 Sep 2010 09:42:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754651Ab0IAJlu (ORCPT ); Wed, 1 Sep 2010 05:41:50 -0400 Received: from casper.infradead.org ([85.118.1.10]:39381 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754607Ab0IAJls convert rfc822-to-8bit (ORCPT ); Wed, 1 Sep 2010 05:41:48 -0400 Received: from f199130.upc-f.chello.nl ([80.56.199.130] helo=laptop) by casper.infradead.org with esmtpsa (Exim 4.72 #1 (Red Hat Linux)) id 1Oqjp2-0004qf-KF; Wed, 01 Sep 2010 09:41:36 +0000 Received: by laptop (Postfix, from userid 1000) id 44C39107D6E8D; Wed, 1 Sep 2010 11:41:36 +0200 (CEST) Subject: Re: ftrace/perf_event leak From: Peter Zijlstra To: Li Zefan Cc: Avi Kivity , Ingo Molnar , Frederic Weisbecker , Steven Rostedt , kvm-devel , Linux Kernel Mailing List In-Reply-To: <4C7E1F12.8030304@cn.fujitsu.com> References: <4C7E11E5.1040402@redhat.com> <1283331868.2059.808.camel@laptop> <4C7E1C36.6070400@redhat.com> <4C7E1F12.8030304@cn.fujitsu.com> Date: Wed, 01 Sep 2010 11:41:35 +0200 Message-ID: <1283334095.2059.849.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 01 Sep 2010 09:42:59 +0000 (UTC) diff --git a/kernel/trace/trace_event_perf.c b/kernel/trace/trace_event_perf.c index 000e6e8..31cc4cb 100644 --- a/kernel/trace/trace_event_perf.c +++ b/kernel/trace/trace_event_perf.c @@ -91,6 +91,8 @@ int perf_trace_init(struct perf_event *p_event) tp_event->class && tp_event->class->reg && try_module_get(tp_event->mod)) { ret = perf_trace_event_init(tp_event, p_event); + if (ret) + module_put(tp_event->mod); break; } }