Skip to content

Commit 9b6fe31

Browse files
Michel Dänzerjbarnes993
authored andcommitted
drm: Copy back ioctl data to userspace regardless of return code.
Fixes a regression from commit 9d5b3ff ('drm: fixup some of the ioctl function exit paths'): The vblank ioctl needs to update the userspace parameters when interrupted by a signal, which was prevented by the return code check. This could cause the X server to hang in drmWaitVBlank(). Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Jesse Barnes <[email protected]>
1 parent b674137 commit 9b6fe31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/drm_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ int drm_ioctl(struct inode *inode, struct file *filp,
481481
}
482482
retcode = func(dev, kdata, file_priv);
483483

484-
if ((retcode == 0) && (cmd & IOC_OUT)) {
484+
if (cmd & IOC_OUT) {
485485
if (copy_to_user((void __user *)arg, kdata,
486486
_IOC_SIZE(cmd)) != 0)
487487
retcode = -EFAULT;

0 commit comments

Comments
 (0)