X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=fs%2Fcompat_ioctl.c;h=4c6285fff598e1faf9bb471f8b3b5593db74b355;hb=dc9fe7f9730c927cd518d9fc7a616d188872e468;hp=f5054025f9da7c154b067db092cc44f8b953f835;hpb=35e9a274fdc9c8feb763e4970a32d7089f51393c;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);