Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756886AbbGQMCO (ORCPT ); Fri, 17 Jul 2015 08:02:14 -0400 Received: from casper.infradead.org ([85.118.1.10]:49012 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756705AbbGQMCL (ORCPT ); Fri, 17 Jul 2015 08:02:11 -0400 Date: Fri, 17 Jul 2015 14:02:06 +0200 From: Peter Zijlstra To: "Wangnan (F)" Cc: kaixu xia , ast@plumgrid.com, davem@davemloft.net, acme@kernel.org, mingo@redhat.com, masami.hiramatsu.pt@hitachi.com, jolsa@kernel.org, linux-kernel@vger.kernel.org, pi3orama@163.com, hekuang@huawei.com Subject: Re: [RFC PATCH 3/6] bpf: Save the pointer to struct perf_event to map Message-ID: <20150717120206.GG19282@twins.programming.kicks-ass.net> References: <1437129816-13176-1-git-send-email-xiakaixu@huawei.com> <1437129816-13176-4-git-send-email-xiakaixu@huawei.com> <20150717110623.GK12596@twins.programming.kicks-ass.net> <55A8E554.9040205@huawei.com> <55A8E83E.6090506@huawei.com> <20150717114054.GE19282@twins.programming.kicks-ass.net> <55A8ED0F.2040208@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55A8ED0F.2040208@huawei.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 656 Lines: 15 On Fri, Jul 17, 2015 at 07:54:55PM +0800, Wangnan (F) wrote: > Thanks. In next version we will introduce a new function which do oppsite > thing to > perf_event_release_kernel() in perf/event/core.c, then fetch the event > before fdput. perf_event_get() as proposed, with the addition of the refcount increment inside the fdget/fdput() is fine. Note that the _get() name already implies a refcount increment. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/