* [PATCH] media: v4l2-compat-ioctl32: fix missing reserved field copy in put_v4l2_create32
@ 2016-03-14 10:41 Tiffany Lin
2016-03-14 11:28 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 3+ messages in thread
From: Tiffany Lin @ 2016-03-14 10:41 UTC (permalink / raw)
To: Hans Verkuil, daniel.thompson, Rob Herring,
Mauro Carvalho Chehab, Matthias Brugger, Daniel Kurtz,
Pawel Osciak
Cc: Eddie Huang, Yingjoe Chen, devicetree, linux-kernel,
linux-arm-kernel, linux-media, linux-mediatek, PoChun.Lin,
Tiffany.lin, Tiffany Lin
Change-Id: Idac449fae5059a3ce255340e6da491f8bd83af7a
---
drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
index f38c076..109f687 100644
--- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
+++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
@@ -280,7 +280,8 @@ static int put_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __user
static int put_v4l2_create32(struct v4l2_create_buffers *kp, struct v4l2_create_buffers32 __user *up)
{
if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_create_buffers32)) ||
- copy_to_user(up, kp, offsetof(struct v4l2_create_buffers32, format)))
+ copy_to_user(up, kp, offsetof(struct v4l2_create_buffers32, format)) ||
+ copy_to_user(up->reserved, kp->reserved, sizeof(kp->reserved)))
return -EFAULT;
return __put_v4l2_format32(&kp->format, &up->format);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] media: v4l2-compat-ioctl32: fix missing reserved field copy in put_v4l2_create32
2016-03-14 10:41 [PATCH] media: v4l2-compat-ioctl32: fix missing reserved field copy in put_v4l2_create32 Tiffany Lin
@ 2016-03-14 11:28 ` Mauro Carvalho Chehab
2016-03-14 12:22 ` tiffany lin
0 siblings, 1 reply; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2016-03-14 11:28 UTC (permalink / raw)
To: Tiffany Lin
Cc: Hans Verkuil, daniel.thompson, Rob Herring, Matthias Brugger,
Daniel Kurtz, Pawel Osciak, Eddie Huang, Yingjoe Chen,
devicetree, linux-kernel, linux-arm-kernel, linux-media,
linux-mediatek, PoChun.Lin
Em Mon, 14 Mar 2016 18:41:46 +0800
Tiffany Lin <tiffany.lin@mediatek.com> escreveu:
> Change-Id: Idac449fae5059a3ce255340e6da491f8bd83af7a
We don't need change-id at the Kernel, but we do need a proper patch
description.
Regards,
Mauro
> ---
> drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
> index f38c076..109f687 100644
> --- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
> +++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
> @@ -280,7 +280,8 @@ static int put_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __user
> static int put_v4l2_create32(struct v4l2_create_buffers *kp, struct v4l2_create_buffers32 __user *up)
> {
> if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_create_buffers32)) ||
> - copy_to_user(up, kp, offsetof(struct v4l2_create_buffers32, format)))
> + copy_to_user(up, kp, offsetof(struct v4l2_create_buffers32, format)) ||
> + copy_to_user(up->reserved, kp->reserved, sizeof(kp->reserved)))
> return -EFAULT;
> return __put_v4l2_format32(&kp->format, &up->format);
> }
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] media: v4l2-compat-ioctl32: fix missing reserved field copy in put_v4l2_create32
2016-03-14 11:28 ` Mauro Carvalho Chehab
@ 2016-03-14 12:22 ` tiffany lin
0 siblings, 0 replies; 3+ messages in thread
From: tiffany lin @ 2016-03-14 12:22 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Hans Verkuil, daniel.thompson, Rob Herring, Matthias Brugger,
Daniel Kurtz, Pawel Osciak, Eddie Huang, Yingjoe Chen,
devicetree, linux-kernel, linux-arm-kernel, linux-media,
linux-mediatek, PoChun.Lin
On Mon, 2016-03-14 at 08:28 -0300, Mauro Carvalho Chehab wrote:
> Em Mon, 14 Mar 2016 18:41:46 +0800
> Tiffany Lin <tiffany.lin@mediatek.com> escreveu:
>
> > Change-Id: Idac449fae5059a3ce255340e6da491f8bd83af7a
>
> We don't need change-id at the Kernel, but we do need a proper patch
> description.
>
Hi Mauro,
Sorry, I accidentally add change-id in this patch.
I had remove change-id and add patch description in
[PATCH v2] media: v4l2-compat-ioctl32: fix missing reserved field copy
in put_v4l2_create32
best regards,
Tiffany
> Regards,
> Mauro
>
> > ---
> > drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
> > index f38c076..109f687 100644
> > --- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
> > +++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
> > @@ -280,7 +280,8 @@ static int put_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __user
> > static int put_v4l2_create32(struct v4l2_create_buffers *kp, struct v4l2_create_buffers32 __user *up)
> > {
> > if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_create_buffers32)) ||
> > - copy_to_user(up, kp, offsetof(struct v4l2_create_buffers32, format)))
> > + copy_to_user(up, kp, offsetof(struct v4l2_create_buffers32, format)) ||
> > + copy_to_user(up->reserved, kp->reserved, sizeof(kp->reserved)))
> > return -EFAULT;
> > return __put_v4l2_format32(&kp->format, &up->format);
> > }
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-14 12:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-14 10:41 [PATCH] media: v4l2-compat-ioctl32: fix missing reserved field copy in put_v4l2_create32 Tiffany Lin
2016-03-14 11:28 ` Mauro Carvalho Chehab
2016-03-14 12:22 ` tiffany lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).