diff options
Diffstat (limited to 'linux/lock.c')
-rw-r--r-- | linux/lock.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/lock.c b/linux/lock.c index 33b2cc03..e5fd435f 100644 --- a/linux/lock.c +++ b/linux/lock.c @@ -218,7 +218,8 @@ int drm_finish(struct inode *inode, struct file *filp, unsigned int cmd, DRM_DEBUG("\n"); - copy_from_user_ret(&lock, (drm_lock_t *)arg, sizeof(lock), -EFAULT); + if (copy_from_user(&lock, (drm_lock_t *)arg, sizeof(lock))) + return -EFAULT; ret = drm_flush_block_and_flush(dev, lock.context, lock.flags); drm_flush_unblock(dev, lock.context, lock.flags); return ret; |