Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755677Ab1DRQWv (ORCPT ); Mon, 18 Apr 2011 12:22:51 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:37278 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755341Ab1DRQWq convert rfc822-to-8bit (ORCPT ); Mon, 18 Apr 2011 12:22:46 -0400 Subject: Re: [PATCH v3 2.6.39-rc1-tip 9/26] 9: uprobes: mmap and fork hooks. From: Peter Zijlstra To: Srikar Dronamraju Cc: Ingo Molnar , Steven Rostedt , Linux-mm , Arnaldo Carvalho de Melo , Linus Torvalds , Jonathan Corbet , Christoph Hellwig , Masami Hiramatsu , Thomas Gleixner , Ananth N Mavinakayanahalli , Oleg Nesterov , LKML , SystemTap , Jim Keniston , Roland McGrath , Andi Kleen , Andrew Morton In-Reply-To: <20110401143413.15455.75831.sendpatchset@localhost6.localdomain6> References: <20110401143223.15455.19844.sendpatchset@localhost6.localdomain6> <20110401143413.15455.75831.sendpatchset@localhost6.localdomain6> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Mon, 18 Apr 2011 18:21:57 +0200 Message-ID: <1303143717.32491.872.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 990 Lines: 24 On Fri, 2011-04-01 at 20:04 +0530, Srikar Dronamraju wrote: > + if (vma) { > + /* > + * We get here from uprobe_mmap() -- the case where we > + * are trying to copy an instruction from a page that's > + * not yet in page cache. > + * > + * Read page in before copy. > + */ > + struct file *filp = vma->vm_file; > + > + if (!filp) > + return -EINVAL; > + page_cache_sync_readahead(mapping, &filp->f_ra, filp, idx, 1); > + } > + page = grab_cache_page(mapping, idx); So I don't see why that isn't so for the normal install_uprobe() <- register_uprobe() path. -- 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/