Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756578Ab1FHWMl (ORCPT ); Wed, 8 Jun 2011 18:12:41 -0400 Received: from mout.perfora.net ([74.208.4.194]:54206 "EHLO mout.perfora.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754015Ab1FHWMk (ORCPT ); Wed, 8 Jun 2011 18:12:40 -0400 Date: Wed, 8 Jun 2011 18:11:41 -0400 From: Stephen Wilson To: Srikar Dronamraju 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 , Oleg Nesterov , 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: <20110608221141.GB9965@wicker.gateway.2wire.net> References: <20110607125804.28590.92092.sendpatchset@localhost6.localdomain6> <20110607130051.28590.68088.sendpatchset@localhost6.localdomain6> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110607130051.28590.68088.sendpatchset@localhost6.localdomain6> User-Agent: Mutt/1.5.21 (2010-09-15) X-Provags-ID: V02:K0:zo3MUd9PZ+vqDTvawJqV25HPvjo25OlNrPzg6epjSWS j6aErHIcChBL3ipnqrBBw/DfMniYZ2Wgx43dwH4LyP+XE6VdmC QXDydtV7LYjQ1FoCls+5lGmpYSUK3e9/y1lJEs1FFH++6Zoliy WEkRaoPmZ3tcmmKeFSjqSQ84car5NRXT0O8uT89MurjUuqUfhi z4UG1SS8FKEF0TUwV7ytw9QPSkJkzlc4JVJ4Os9bAI= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 982 Lines: 37 On Tue, Jun 07, 2011 at 06:30:51PM +0530, Srikar Dronamraju wrote: > +/* > + * uprobe_post_notifier gets called in interrupt context. > + * It completes the single step operation. > + */ > +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? -- steve -- 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/