Fix bug in return to userspace resctx code

From: Egbert Eich <eich@suse.de>
main
Dave Airlie 2005-08-05 13:04:21 +00:00
parent c789ea1521
commit 99c3f88c69
1 changed files with 1 additions and 1 deletions

View File

@ -372,7 +372,7 @@ int drm_resctx(struct inode *inode, struct file *filp,
memset(&ctx, 0, sizeof(ctx));
for (i = 0; i < DRM_RESERVED_CONTEXTS; i++) {
ctx.handle = i;
if (copy_to_user(&res.contexts[i], &i, sizeof(i)))
if (copy_to_user(&res.contexts[i], &ctx, sizeof(ctx)))
return -EFAULT;
}
}