egl: Fix _eglPointerIsDereferencable() to ignore page residency
authorMiguel A. Vico <mvicomoya@nvidia.com>
Thu, 20 Jul 2017 00:25:57 +0000 (17:25 -0700)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 24 Jul 2017 09:27:48 +0000 (10:27 +0100)
commit63c251e38f9b4ac3606094a72c8c5b658402f3d0
tree4b1b9d14be0a063e46c6cfc0287a66207f963cc3
parent045108938c11f507dcc3c50b59b0a8a8529486bd
egl: Fix _eglPointerIsDereferencable() to ignore page residency

mincore() returns 0 on success, and -1 on failure.  The last parameter
is a vector of bytes with one entry for each page queried.  mincore
returns page residency information in the first bit of each byte in the
vector.

Residency doesn't actually matter when determining whether a pointer is
dereferenceable, so the output vector can be ignored.  What matters is
whether mincore succeeds. See:

  http://man7.org/linux/man-pages/man2/mincore.2.html

Signed-off-by: Miguel A. Vico <mvicomoya@nvidia.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/main/eglglobals.c