diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-01-30 12:05:55 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-02-03 09:47:32 +0000 |
commit | 08bc3d4e67d486a9b2a5065c1c2ebaf13048a465 (patch) | |
tree | eeb6fd0aba879c179af56fcab282993be690e083 /drivers/gpu/drm/drm_ioc32.c | |
parent | 6c073a7ee250118b8be3a2379c96fd7f78382b06 (diff) | |
download | blackbird-op-linux-08bc3d4e67d486a9b2a5065c1c2ebaf13048a465.tar.gz blackbird-op-linux-08bc3d4e67d486a9b2a5065c1c2ebaf13048a465.zip |
drivers/gpu/drm/drm_ioc32.c: initialize all fields
The c32 structure is allocated on the stack and its idx field is not
initialized before copying it to user level. This patch takes the value
from the result of the ioctl, as done for the other fields.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_ioc32.c')
-rw-r--r-- | drivers/gpu/drm/drm_ioc32.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c index ddd70db45f76..637fcc3766c7 100644 --- a/drivers/gpu/drm/drm_ioc32.c +++ b/drivers/gpu/drm/drm_ioc32.c @@ -315,7 +315,8 @@ static int compat_drm_getclient(struct file *file, unsigned int cmd, if (err) return err; - if (__get_user(c32.auth, &client->auth) + if (__get_user(c32.idx, &client->idx) + || __get_user(c32.auth, &client->auth) || __get_user(c32.pid, &client->pid) || __get_user(c32.uid, &client->uid) || __get_user(c32.magic, &client->magic) |