X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=fs%2Fcompat_ioctl.c;h=3deb58d086b760dcebaba21b22a0ce0bc04ceea3;hb=0f08180863ef4aca8e7d3655d266e62e5dc4761b;hp=61abb638b4bfdcef8c2a47446fb778714b9b25b8;hpb=8ce26169555cf5634263d39d3665e45300218a5e;p=firefly-linux-kernel-4.4.55.git diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 61abb638b4bf..3deb58d086b7 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -208,6 +208,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);