提交 9b6fe313 编写于 作者: M Michel Dänzer 提交者: Jesse Barnes

drm: Copy back ioctl data to userspace regardless of return code.

Fixes a regression from commit 9d5b3ffc
('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: NMichel Dänzer <daenzer@vmware.com>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
上级 b6741377
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册