Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751652Ab1FIFuj (ORCPT ); Thu, 9 Jun 2011 01:50:39 -0400 Received: from e2.ny.us.ibm.com ([32.97.182.142]:47234 "EHLO e2.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750953Ab1FIFui (ORCPT ); Thu, 9 Jun 2011 01:50:38 -0400 Date: Thu, 9 Jun 2011 11:13:04 +0530 From: Srikar Dronamraju 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 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> 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: 1248 Lines: 46 > > + > > + 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 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/