mesa/src/panfrost
Carsten Haitzler (Rasterman) fcebdcb3b3 panfrost: Fix Bo imports to not take the process down if fd is invalid
If the calling process happens to use an invalid bo (e.g. fd has been
closed), this led to lseek() returning -1 and this mmap trying to mmap
a buffer of size -1 (0xffffffffffffffff ...) which led to mmap
failing, which led to munmap failing which then led to the process
aborting.

This fixes that to gracefully handle the mmap failures and percolate
the failures back up through the API so eglCreateImage will not return
a valid image anymore, thus the error is detectable in the caller
process too.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10313>
2021-04-20 08:26:04 +02:00
..
bifrost Convert most remaining free-form fall-through comments to FALLTHROUGH 2021-04-15 16:01:22 +00:00
include panfrost: Pass a tile enable map to avoid reloading untouched tiles 2021-04-13 18:06:37 +00:00
lib panfrost: Fix Bo imports to not take the process down if fd is invalid 2021-04-20 08:26:04 +02:00
midgard panfrost: Enable packed uniforms. 2021-04-19 19:44:51 +00:00
shared
util panfrost: Don't allow FPK if a RT is missing 2021-04-19 20:32:59 +00:00
Android.bifrost.mk
Android.lib.mk
Android.midgard.mk
Android.mk
Android.shared.mk
Android.util.mk
Makefile.sources android: panfrost/lib: add pan_cs.c to Makefile.sources 2021-04-19 18:53:43 +00:00
meson.build panfrost: Add a Meson dependency on bi_opcodes.h for bifrost_compiler 2021-03-19 19:22:29 +00:00