diff options
| -rw-r--r-- | linux-core/drm_ioctl.c | 8 | 
1 files changed, 8 insertions, 0 deletions
diff --git a/linux-core/drm_ioctl.c b/linux-core/drm_ioctl.c index b8ed5a70..24f6579f 100644 --- a/linux-core/drm_ioctl.c +++ b/linux-core/drm_ioctl.c @@ -328,6 +328,14 @@ int drm_setversion(DRM_IOCTL_ARGS)  	DRM_COPY_FROM_USER_IOCTL(sv, argp, sizeof(sv)); +	/* +	 * version.name etc need to be initialized to zero. +	 * If we don't, driver->version() will poke random strings to +	 * random locations in user space, causing X server segfaults +	 * that are interesting to debug.   --eich +	 */ +	memset(&version, 0, sizeof(version)); +  	dev->driver->version(&version);  	retv.drm_di_major = DRM_IF_MAJOR;  	retv.drm_di_minor = DRM_IF_MINOR;  | 
