drm-shim: Implement a shim function for close
authorIcecream95 <ixn@disroot.org>
Mon, 6 Sep 2021 07:54:32 +0000 (19:54 +1200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 12 Apr 2022 10:01:39 +0000 (10:01 +0000)
commitfc6f1413042f1dad32c68bd968fa9abcca61659a
tree906b07ef627af95fa2187843e222190216be8b98
parentc9eec12be7e67a5dbe314ca909bb58f068b6e430
drm-shim: Implement a shim function for close

Remove the fd from the fd_map, so that if the fd is later reused for
another file then mmap won't be intercepted.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12203>
src/drm-shim/device.c
src/drm-shim/drm_shim.c
src/drm-shim/drm_shim.h