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

Commit e3552920 authored by Shivendra Kakrania's avatar Shivendra Kakrania Committed by Chinmay Sawarkar
Browse files

media: v4l2-core: 32 bit to 64 bit v4l2-compat changes



Along with data_offset, also copy the reserved and length
fields where applicable. Needed for running 32 bit app.

CRs-Fixed: 2384822
Change-Id: I074ead5bbcda84e7be4a9dd11d80d2dd8e8975c6
Signed-off-by: default avatarShivendra Kakrania <shiven@codeaurora.org>
Signed-off-by: default avatarChinmay Sawarkar <chinmays@codeaurora.org>
parent 3b3e314b
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -493,7 +493,11 @@ static int get_v4l2_plane32(struct v4l2_plane __user *p64,

	if (copy_in_user(p64, p32, 2 * sizeof(__u32)) ||
	    copy_in_user(&p64->data_offset, &p32->data_offset,
			 sizeof(p64->data_offset)))
			 sizeof(p64->data_offset)) ||
	    copy_in_user(p64->reserved, p32->reserved,
			 sizeof(p64->reserved)) ||
	    copy_in_user(&p64->length, &p32->length,
			 sizeof(p64->length)))
		return -EFAULT;

	switch (memory) {
@@ -525,7 +529,9 @@ static int put_v4l2_plane32(struct v4l2_plane __user *p64,

	if (copy_in_user(p32, p64, 2 * sizeof(__u32)) ||
	    copy_in_user(&p32->data_offset, &p64->data_offset,
			 sizeof(p64->data_offset)))
			 sizeof(p64->data_offset)) ||
	    copy_in_user(p32->reserved, p64->reserved,
			 sizeof(p64->reserved)))
		return -EFAULT;

	switch (memory) {