Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757364Ab1CONsE (ORCPT ); Tue, 15 Mar 2011 09:48:04 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.125]:40912 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753304Ab1CONsC (ORCPT ); Tue, 15 Mar 2011 09:48:02 -0400 X-Authority-Analysis: v=1.1 cv=ZtuXOl23UuD1yoJUTgnZ6i6Z5VPlPhPMWCeUNtN8OGA= c=1 sm=0 a=Dpgx0ZSdzJoA:10 a=Q9fys5e9bTEA:10 a=OPBmh+XkhLl+Enan7BmTLg==:17 a=lIPM80yYOjFTmlQ0L8sA:9 a=Hdpj5k0-GVdXtPSH1cNUbgLzJroA:4 a=PUjeQqilurYA:10 a=OPBmh+XkhLl+Enan7BmTLg==:117 X-Cloudmark-Score: 0 X-Originating-IP: 67.242.120.143 Subject: Re: [PATCH v2 2.6.38-rc8-tip 7/20] 7: uprobes: store/restore original instruction. From: Steven Rostedt To: Srikar Dronamraju Cc: Stephen Wilson , Peter Zijlstra , Ingo Molnar , Linux-mm , Arnaldo Carvalho de Melo , Linus Torvalds , Ananth N Mavinakayanahalli , Christoph Hellwig , Andi Kleen , Masami Hiramatsu , Oleg Nesterov , LKML , Jim Keniston , Roland McGrath , SystemTap , Andrew Morton , "Paul E. McKenney" In-Reply-To: <20110315092247.GW24254@linux.vnet.ibm.com> References: <20110314133403.27435.7901.sendpatchset@localhost6.localdomain6> <20110314133522.27435.45121.sendpatchset@localhost6.localdomain6> <20110314180914.GA18855@fibrous.localdomain> <20110315092247.GW24254@linux.vnet.ibm.com> Content-Type: text/plain; charset="ISO-8859-15" Date: Tue, 15 Mar 2011 09:47:59 -0400 Message-ID: <1300196879.9910.271.camel@gandalf.stny.rr.com> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 851 Lines: 43 On Tue, 2011-03-15 at 14:52 +0530, Srikar Dronamraju wrote: > * Stephen Wilson [2011-03-14 14:09:14]: > Nitpick: > Guess checking for tsk != NULL would only help if and only if we are doing > within rcu. i.e we have to change to something like this > tsk = NULL; > rcu_read_lock() > if (mm->owner) { > get_task_struct(mm->owner) > tsk = mm->owner; > } > rcu_read_unlock() > if (!tsk) > return ret; > > Agree? Or: rcu_read_lock(); tsk = mm->owner; if (tsk) get_task_struct(tsk); rcu_read_unlock(); if (!tsk) return ret; Probably looks cleaner. -- 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/