Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 16 Oct 2002 07:07:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 16 Oct 2002 07:07:28 -0400 Received: from sccrmhc02.attbi.com ([204.127.202.62]:16821 "EHLO sccrmhc02.attbi.com") by vger.kernel.org with ESMTP id ; Wed, 16 Oct 2002 07:07:27 -0400 Message-ID: <3DAD49F0.8050808@quark.didntduck.org> Date: Wed, 16 Oct 2002 07:13:52 -0400 From: Brian Gerst User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020607 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Melkor Ainur CC: linux-kernel@vger.kernel.org Subject: Re: user space virtual address to a vm_area_struct References: <20021016091011.9346.qmail@web21204.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 682 Lines: 25 Melkor Ainur wrote: > Hi, > > Is there a recommended way for a driver to take an > application provided virtual address while executing > in the syscall context of that same application and > find the corresponding vm_area_struct (if exists for > that address) that spans that virtual address? > > Melkor down_read(current->mm->mmap_sem); vma = find_vma(current->mm, address); ... up_read(current->mm->mmap_sem); -- Brian Gerst - 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/