From: Dave Airlie Date: Fri, 5 Aug 2005 12:02:48 +0000 (+1000) Subject: drm: copy the right data back to userspace for getreserved contexts ioctl X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c73681e77b40697d16ada777adf2c6dc4db05917;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git drm: copy the right data back to userspace for getreserved contexts ioctl This fixes the information copied back to userspace by the get reserved contexts ioctl. From: Egbert Eich Signed-off-by: Dave Airlie --- diff --git a/drivers/char/drm/drm_context.c b/drivers/char/drm/drm_context.c index a7cfabd1ca2..5af46c9830e 100644 --- a/drivers/char/drm/drm_context.c +++ b/drivers/char/drm/drm_context.c @@ -369,7 +369,7 @@ int drm_resctx( struct inode *inode, struct file *filp, for ( i = 0 ; i < DRM_RESERVED_CONTEXTS ; i++ ) { ctx.handle = i; if ( copy_to_user( &res.contexts[i], - &i, sizeof(i) ) ) + &ctx, sizeof(ctx) ) ) return -EFAULT; } }