mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-08 22:08:44 +02:00
don't copy back if an error was returned.
This commit is contained in:
parent
972ec4fa25
commit
b2c4c7ae5e
1 changed files with 1 additions and 1 deletions
|
|
@ -660,7 +660,7 @@ long drm_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
|||
retcode = func(dev, kdata, file_priv);
|
||||
}
|
||||
|
||||
if (cmd & IOC_OUT) {
|
||||
if ((retcode == 0) && cmd & IOC_OUT) {
|
||||
if (copy_to_user((void __user *)arg, kdata,
|
||||
_IOC_SIZE(cmd)) != 0)
|
||||
retcode = -EACCES;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue