X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=fs%2Fcompat_ioctl.c;h=4c6285fff598e1faf9bb471f8b3b5593db74b355;hb=13d2b4d11d69a92574a55bfd985cfb0ca77aebdc;hp=f5054025f9da7c154b067db092cc44f8b953f835;hpb=ef8ff74ed8dd9d4b3ba8cb9f2fc927a27c697a8b;p=firefly-linux-kernel-4.4.55.git diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index f5054025f9da..4c6285fff598 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);