Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd2351da authored by Rob Clark's avatar Rob Clark Committed by Dave Airlie
Browse files

drm: drm_ioctl() should zero-init extra data



If an older userspace passes in a smaller arg than the current kernel
ioctl arg struct, then extra fields should be initialized to zero
rather than passing random data to the DRM driver.

Signed-off-by: default avatarRob Clark <rob@ti.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 017ed801
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -438,6 +438,8 @@ long drm_ioctl(struct file *filp,
					goto err_i1;
					goto err_i1;
				}
				}
			}
			}
			if (asize > usize)
				memset(kdata + usize, 0, asize - usize);
		}
		}


		if (cmd & IOC_IN) {
		if (cmd & IOC_IN) {