From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755202Ab1DKIgB (ORCPT ); Mon, 11 Apr 2011 04:36:01 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:35421 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755231Ab1DKIgA convert rfc822-to-8bit (ORCPT ); Mon, 11 Apr 2011 04:36:00 -0400 Subject: Re: [RFC][PATCH 2/9] perf: Clean up ctx reference counting From: Peter Zijlstra To: Lin Ming Cc: Oleg Nesterov , Jiri Olsa , Ingo Molnar , "linux-kernel@vger.kernel.org" , Stephane Eranian In-Reply-To: <1302501948.29423.4.camel@minggr.sh.intel.com> References: <20110409191739.813727025@chello.nl> <20110409192141.719340481@chello.nl> <1302501948.29423.4.camel@minggr.sh.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Mon, 11 Apr 2011 10:35:40 +0200 Message-ID: <1302510940.2388.10.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2011-04-11 at 14:05 +0800, Lin Ming wrote: > > + put_ctx(ctx); > > You moved the get_ctx(), so it seems that this put_ctx is missing its > relevant get_ctx. Yeah, its cheating since we initialize the refcount on 1.