X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=fs%2Fcompat_ioctl.c;h=d72deac465e34c48f1924ec5d2034acf39d42bac;hp=51352de88ef10ea41583661f39625f93b475aa34;hb=65b073589499cd4f2e9e3e94f491b6d7b47a8255;hpb=c28800a9c3caaf387d85ac665a25ebe99e480295 diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 51352de88ef1..d72deac465e3 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -210,6 +210,8 @@ static int do_video_set_spu_palette(unsigned int fd, unsigned int cmd, err = get_user(palp, &up->palette); err |= get_user(length, &up->length); + if (err) + return -EFAULT; up_native = compat_alloc_user_space(sizeof(struct video_spu_palette)); err = put_user(compat_ptr(palp), &up_native->palette); @@ -606,7 +608,6 @@ struct serial_struct32 { static int serial_struct_ioctl(unsigned fd, unsigned cmd, struct serial_struct32 __user *ss32) { - typedef struct serial_struct SS; typedef struct serial_struct32 SS32; int err; struct serial_struct ss;