From 99c3f88c69e5a9ac7cddd0bb24e8be3415616656 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 5 Aug 2005 13:04:21 +0000 Subject: Fix bug in return to userspace resctx code From: Egbert Eich --- linux-core/drm_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux-core/drm_context.c') diff --git a/linux-core/drm_context.c b/linux-core/drm_context.c index fd3f0280..baa8437d 100644 --- a/linux-core/drm_context.c +++ b/linux-core/drm_context.c @@ -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; } } -- cgit v1.2.3