Mesa (master): drm-shim: Return -EINVAL instead of abort()ing on unknown ioctls.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 30 20:55:39 UTC 2020


Module: Mesa
Branch: master
Commit: 75b1f3d39df4f098b3674adee52a9db41c1fa96a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=75b1f3d39df4f098b3674adee52a9db41c1fa96a

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jul 20 11:21:36 2020 -0700

drm-shim: Return -EINVAL instead of abort()ing on unknown ioctls.

I had this as abort() in my original implementation since I was doing
drm-shim and my kernel driver in parallel based around using a SW
simulator, and I wanted to always update both, but it means that people's
new feature detection code can easily end up breaing their drm-shim
shader-db runs (such as intel's kernel_has_dynamic_config_support()
checking for -ENOENT instead of -EINVAL for a feature, which showed up on
my personal runner but not fd.o's for reasons I'm unclear on).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5994>

---

 src/drm-shim/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/drm-shim/device.c b/src/drm-shim/device.c
index 2ad25344087..97bb1183ea8 100644
--- a/src/drm-shim/device.c
+++ b/src/drm-shim/device.c
@@ -261,7 +261,7 @@ drm_shim_ioctl(int fd, unsigned long request, void *arg)
               nr, request);
    }
 
-   abort();
+   return -EINVAL;
 }
 
 void



More information about the mesa-commit mailing list