if (copy_in_user(up, up32, 2 * sizeof(__u32)) ||
copy_in_user(&up->data_offset, &up32->data_offset,
+ sizeof(__u32)) ||
+ copy_in_user(up->reserved, up32->reserved,
+ sizeof(up->reserved)) ||
+ copy_in_user(&up->length, &up32->length,
sizeof(__u32)))
return -EFAULT;
enum v4l2_memory memory)
{
if (copy_in_user(up32, up, 2 * sizeof(__u32)) ||
+ copy_in_user(up32->reserved, up->reserved,
+ sizeof(up32->reserved)) ||
copy_in_user(&up32->data_offset, &up->data_offset,
sizeof(__u32)))
return -EFAULT;
if (copy_in_user(&up32->m.fd, &up->m.fd,
sizeof(int)))
return -EFAULT;
+ if (memory == V4L2_MEMORY_USERPTR)
+ if (copy_in_user(&up32->m.userptr, &up->m.userptr,
+ sizeof(compat_long_t)))
+ return -EFAULT;
return 0;
}
struct v4l2_event32 {
__u32 type;
union {
- compat_s64 value64;
- __u8 data[64];
+ struct v4l2_event_vsync vsync;
+ struct v4l2_event_ctrl ctrl;
+ struct v4l2_event_frame_sync frame_sync;
+ struct v4l2_event_src_change src_change;
+ struct v4l2_event_motion_det motion_det;
+ compat_s64 value64;
+ __u8 data[64];
} u;
__u32 pending;
__u32 sequence;