lkml.org 
[lkml]   [2002]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: user space virtual address to a vm_area_struct
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/

\
 
 \ /
  Last update: 2005-03-22 13:30    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site