~vcs-imports/xserver-xorg-video-intel/master

Viewing all changes in revision 8604.

  • Committer: Chris Wilson
  • Date: 2021-01-15 20:59:05 UTC
  • Revision ID: git-v1:31486f40f8e8f8923ca0799aea84b58799754564
sna: Always validate userptr upon creation

Since not all memory ranges can be mapped by userptr, in particular those
passed by XShmAttachFD, we need to validate the userptr before use. We
would ideally want to continue to lazily populate the pages as often the
userptr is created but never used, but preventing an EFAULT later is
more important.

In https://patchwork.freedesktop.org/series/33449/ we provided a more
efficient method for probing the userptr on construction while
preserving the lazy population of gup-pages. For now, always follow
userptr with set-domain.

Reported-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: