From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail6.bemta12.messagelabs.com (mail6.bemta12.messagelabs.com [216.82.250.247]) by kanga.kvack.org (Postfix) with ESMTP id E51BC6B0078 for ; Thu, 9 Jun 2011 01:50:26 -0400 (EDT) Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by e6.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p595Q75p030130 for ; Thu, 9 Jun 2011 01:26:07 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p595oBSP1314998 for ; Thu, 9 Jun 2011 01:50:15 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p595o9As016507 for ; Thu, 9 Jun 2011 02:50:11 -0300 Date: Thu, 9 Jun 2011 11:13:04 +0530 From: Srikar Dronamraju Subject: Re: [PATCH v4 3.0-rc2-tip 4/22] 4: Uprobes: register/unregister probes. Message-ID: <20110609054304.GC6123@linux.vnet.ibm.com> Reply-To: Srikar Dronamraju References: <20110607125804.28590.92092.sendpatchset@localhost6.localdomain6> <20110607125900.28590.16071.sendpatchset@localhost6.localdomain6> <20110608221032.GA9965@wicker.gateway.2wire.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20110608221032.GA9965@wicker.gateway.2wire.net> Sender: owner-linux-mm@kvack.org List-ID: To: Stephen Wilson Cc: Peter Zijlstra , Ingo Molnar , Steven Rostedt , Linux-mm , Arnaldo Carvalho de Melo , Linus Torvalds , Ananth N Mavinakayanahalli , Hugh Dickins , Christoph Hellwig , Jonathan Corbet , Thomas Gleixner , Masami Hiramatsu , Oleg Nesterov , Andrew Morton , Jim Keniston , Roland McGrath , Andi Kleen , LKML > > + > > + mm = vma->vm_mm; > > + if (!valid_vma(vma)) { > > + mmput(mm); > > + continue; > > + } > > + > > + vaddr = vma->vm_start + offset; > > + vaddr -= vma->vm_pgoff << PAGE_SHIFT; > > + if (vaddr < vma->vm_start || vaddr > vma->vm_end) { > > This check looks like it is off by one? vma->vm_end is already one byte > past the last valid address in the vma, so we should compare using ">=" > here I think. Right, we are off-by one. Will correct in the next patchset. Will also correct the other places where we check for vm_end. > > + > > + if (!del_consumer(uprobe, consumer)) { > > + pr_debug("No uprobe found with consumer %p\n", > > + consumer); > > + return; > > + } > > When del_consumer() fails dont we still need to do a put_uprobe(uprobe) > to drop the extra access ref? > Yes, we need to check and drop the reference. Will correct in the next patchset. > > + > > + INIT_LIST_HEAD(&tmp_list); > > + > > + mapping = inode->i_mapping; -- Thanks and Regards Srikar -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org