From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755380Ab1KXJvc (ORCPT ); Thu, 24 Nov 2011 04:51:32 -0500 Received: from e1.ny.us.ibm.com ([32.97.182.141]:59492 "EHLO e1.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752508Ab1KXJva (ORCPT ); Thu, 24 Nov 2011 04:51:30 -0500 Date: Thu, 24 Nov 2011 15:19:56 +0530 From: Srikar Dronamraju To: Peter Zijlstra , Linus Torvalds Cc: Oleg Nesterov , Andrew Morton , LKML , Linux-mm , Ingo Molnar , Andi Kleen , Christoph Hellwig , Steven Rostedt , Roland McGrath , Thomas Gleixner , Masami Hiramatsu , Arnaldo Carvalho de Melo , Anton Arapov , Ananth N Mavinakayanahalli , Jim Keniston , tulasidhard@gmail.com Subject: Re: Fwd: uprobes: register/unregister probes. Message-ID: <20111124094956.GC28065@linux.vnet.ibm.com> Reply-To: Srikar Dronamraju References: <603b0079-5f54-4299-9a9a-a5e237ccca73@l23g2000pro.googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <603b0079-5f54-4299-9a9a-a5e237ccca73@l23g2000pro.googlegroups.com> User-Agent: Mutt/1.5.20 (2009-06-14) x-cbid: 11112409-6078-0000-0000-000004CAF119 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > + > > +       mutex_unlock(uprobes_hash(inode)); > > +       put_uprobe(uprobe); > > + > > +reg_out: > > +       iput(inode); > > +       return ret; > > +} > > So if this function returns an error the caller is responsible for > cleaning up consumer, otherwise we take responsibility. The caller is always responsible to cleanup the consumer. The only field we touch in the consumer is the next; thats because we use to link up the consumers. -- Thanks and Regards Srikar