]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
dtrace: ensure one can try to get user pages without locking or faulting
authorKris Van Hees <kris.van.hees@oracle.com>
Tue, 29 Apr 2014 06:16:48 +0000 (02:16 -0400)
committerKris Van Hees <kris.van.hees@oracle.com>
Thu, 1 May 2014 13:12:45 +0000 (09:12 -0400)
This commit changes the FOLL_NOFAULT flag into a FOLL_IMMED flag, to
more accurately convey its meaning, i.e. to request user pages without
waiting for any locks and without servicing any page faults as a result
of the request.  This is necessary in order to request user pages from
interrupt context.

This also completes the implementation by ensuring that the PTE spinlock
is checked rather than trying to lock it (and possibly get stuck in a
deadlock spinning for it).

Orabug: 18653713

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
dtrace/dtrace_isa.c

index fd5f6cf0252c1898bf46c70bbebc0dbbfdaee582..18ead9c6ec08bbe07504a60ad728e844e81abc63 100644 (file)
@@ -267,7 +267,7 @@ static struct vm_area_struct *find_user_vma(struct task_struct *tsk,
 {
        struct vm_area_struct *vma = NULL;
        int nonblocking = 1;
-       int flags = FOLL_NOFAULT;
+       int flags = FOLL_IMMED;
        int ret;
 
        if (page)