From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Oliver Neukum <oneukum@suse.com>
Cc: mchehab@kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCH] uvc: fix access to uninitialized fields on probe error
Date: Thu, 2 May 2019 14:43:44 +0300 [thread overview]
Message-ID: <20190502114344.GP4888@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20190430122814.24986-1-oneukum@suse.com>
Hi Oliver,
Thank you for the patch.
On Tue, Apr 30, 2019 at 02:28:14PM +0200, Oliver Neukum wrote:
> We need to check whether this work we are canceling actually is
> initialized.
I think we should add
Fixes: e5225c820c05 ("media: uvcvideo: Send a control event when a Control Change interrupt arrives")
> Signed-off-by: Oliver Neukum <oneukum@suse.com>
> Reported-by: syzbot+2e1ef9188251d9cc7944@syzkaller.appspotmail.com
> ---
> drivers/media/usb/uvc/uvc_ctrl.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
> index 14cff91b7aea..2b510c56cf91 100644
> --- a/drivers/media/usb/uvc/uvc_ctrl.c
> +++ b/drivers/media/usb/uvc/uvc_ctrl.c
> @@ -2350,7 +2350,9 @@ void uvc_ctrl_cleanup_device(struct uvc_device *dev)
> struct uvc_entity *entity;
> unsigned int i;
>
> - cancel_work_sync(&dev->async_ctrl.work);
> + /* can be uninitialized if we are aborting on probe error */
Let's capitalise the comment and end it with a period to match the rest
of the driver. With these small issues fixed,
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
If you agree with the changes there's no need to resubmit, I'll fix when
applying.
> + if (dev->async_ctrl.work.func)
> + cancel_work_sync(&dev->async_ctrl.work);
>
> /* Free controls and control mappings for all entities. */
> list_for_each_entry(entity, &dev->entities, list) {
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2019-05-02 11:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-30 12:28 [PATCH] uvc: fix access to uninitialized fields on probe error Oliver Neukum
2019-05-02 11:43 ` Laurent Pinchart [this message]
2019-05-06 10:36 ` Oliver Neukum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190502114344.GP4888@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=oneukum@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.