Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1a83eba4 authored by Maheshwar Ajja's avatar Maheshwar Ajja
Browse files

[media] v4l: Copy reserved and length fields v4l2_plane32 functions



Reserved and length fields copied in multi-planar ioctl handling
to the 32bit compatibility layer.

CRs-Fixed: 2041182
Change-Id: I676ac2ac315d9968891bf0ff71e0e4edc2b4b45b
Signed-off-by: default avatarMaheshwar Ajja <majja@codeaurora.org>
parent 7fc1bbb1
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -360,6 +360,10 @@ static int get_v4l2_plane32(struct v4l2_plane __user *up, struct v4l2_plane32 __

	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;

@@ -386,7 +390,9 @@ static int put_v4l2_plane32(struct v4l2_plane __user *up, struct v4l2_plane32 __
{
	if (copy_in_user(up32, up, 2 * sizeof(__u32)) ||
		copy_in_user(&up32->data_offset, &up->data_offset,
				sizeof(__u32)))
				sizeof(__u32)) ||
		copy_in_user(up32->reserved, up->reserved,
				sizeof(up32->reserved)))
		return -EFAULT;

	/* For MMAP, driver might've set up the offset, so copy it back.