mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
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: Rob Clark <rob@ti.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
017ed8012e
commit
dd2351da7c
1 changed files with 2 additions and 0 deletions
|
@ -438,6 +438,8 @@ long drm_ioctl(struct file *filp,
|
|||
goto err_i1;
|
||||
}
|
||||
}
|
||||
if (asize > usize)
|
||||
memset(kdata + usize, 0, asize - usize);
|
||||
}
|
||||
|
||||
if (cmd & IOC_IN) {
|
||||
|
|
Loading…
Reference in a new issue