drm-shim: Use anonymous file for file override
authorJoshua Watt <JPEWhacker@gmail.com>
Wed, 31 Aug 2022 13:15:29 +0000 (08:15 -0500)
committerMarge Bot <emma+marge@anholt.net>
Tue, 16 May 2023 04:31:22 +0000 (04:31 +0000)
commite0c3324695cd0232ef08df0394ba8922766bef3d
treee661d63d6a28f7238ab0cb19670ac0a05f878415
parent730834aa6b3794128dac0daea4b1eb1212a6b163
drm-shim: Use anonymous file for file override

Using a pipe might mean that either the read or write call can block,
most likely deadlocking the calling process. Instead, write the contents
in an anonymous file when the file is opened to be read back.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18341>
src/drm-shim/drm_shim.c