Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752246Ab1FIFzF (ORCPT ); Thu, 9 Jun 2011 01:55:05 -0400 Received: from e4.ny.us.ibm.com ([32.97.182.144]:50122 "EHLO e4.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751291Ab1FIFzC (ORCPT ); Thu, 9 Jun 2011 01:55:02 -0400 Date: Thu, 9 Jun 2011 11:17:54 +0530 From: Srikar Dronamraju To: Stephen Wilson Cc: Peter Zijlstra , Ingo Molnar , Steven Rostedt , Linux-mm , Arnaldo Carvalho de Melo , Linus Torvalds , Andi Kleen , Hugh Dickins , Christoph Hellwig , Jonathan Corbet , Thomas Gleixner , Masami Hiramatsu , LKML , Jim Keniston , Roland McGrath , Ananth N Mavinakayanahalli , Andrew Morton Subject: Re: [PATCH v4 3.0-rc2-tip 13/22] 13: uprobes: Handing int3 and singlestep exception. Message-ID: <20110609054754.GD6123@linux.vnet.ibm.com> Reply-To: Srikar Dronamraju References: <20110607125804.28590.92092.sendpatchset@localhost6.localdomain6> <20110607130051.28590.68088.sendpatchset@localhost6.localdomain6> <20110608221141.GB9965@wicker.gateway.2wire.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20110608221141.GB9965@wicker.gateway.2wire.net> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 995 Lines: 34 > > + */ > > +int uprobe_post_notifier(struct pt_regs *regs) > > +{ > > + struct uprobe *uprobe; > > + struct uprobe_task *utask; > > + > > + if (!current->mm || !current->utask || !current->utask->active_uprobe) > > + /* task is currently not uprobed */ > > + return 0; > > + > > + utask = current->utask; > > + uprobe = utask->active_uprobe; > > + if (!uprobe) > > + return 0; > > + > > + set_thread_flag(TIF_UPROBE); > > + return 1; > > +} > > Looks like this can be simplified. If current->utask->active_uprobe is > non-null then surely the assignment to uprobe will be too? > Yes, the two lines where we check for !uprobe and return are redundant and can be removed. Will be corrected in the next patchset. -- Thanks and Regards Srikar -- 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/