Re: drm_read() to paged-out memory area

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 24, 2015 at 10:14:20PM +0000, Chris Wilson wrote:
> On Tue, Nov 24, 2015 at 09:49:58PM +0100, Thomas Hellstrom wrote:
> > Hi, Chris,
> > 
> > With your new (well sort of) implementation of drm_read() it looks to me
> > like a drm_read() to a paged out
> > memory area will always fail with -EFAULT. From what I can tell, there's
> > nothing there to generate a page-fault to get the destination paged back
> > into memory?
> 
> True. Whoops.

Ok, I've added a test case (igt/drm_read/fault-buffer) that forces a
pagefault here by using a dumb bo as the destination buffer. (At least
on i915, we do not do any prefaulting inside the mmap routine.)

That demonstrates that __copy_to_user_inatomic() itself does not disable
pagefaults (i.e. it does not call pagefault_disable) and hence why we
don't always immediately generate EFAULT.

That leaves us with the issue that the fault handler may still deadlock
on the dev->event_lock, so it still needs to be fixed.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux