Skip to content

Commit

Permalink
drm: Copy back ioctl data to userspace regardless of return code.
Browse files Browse the repository at this point in the history
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 <daenzer@vmware.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
  • Loading branch information
Michel Dänzer authored and Jesse Barnes committed May 20, 2009
1 parent b674137 commit 9b6fe31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ int drm_ioctl(struct inode *inode, struct file *filp,
}
retcode = func(dev, kdata, file_priv);

if ((retcode == 0) && (cmd & IOC_OUT)) {
if (cmd & IOC_OUT) {
if (copy_to_user((void __user *)arg, kdata,
_IOC_SIZE(cmd)) != 0)
retcode = -EFAULT;
Expand Down

0 comments on commit 9b6fe31

Please sign in to comment.