lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPybu_0O10SsPp4G8SfcsbCP5k1gXQJ5Hmhw4kMFTZguEZ7iBQ@mail.gmail.com>
Date: Tue, 21 Oct 2025 12:47:23 +0200
From: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
To: Michal Pecio <michal.pecio@...il.com>
Cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>, Hans de Goede <hansg@...nel.org>, 
	Mauro Carvalho Chehab <mchehab@...nel.org>, Hans Verkuil <hverkuil@...nel.org>, 
	Ricardo Ribalda <ribalda@...omium.org>, linux-media@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: uvcvideo: Return queued buffers on
 start_streaming() failure

Hi Michal

It seems that the device was disconnected while doing streamon. That
caused uvc_pm_get() to fail and exit without returning the buffers.

Your patch is not going to help to fix:
xhci_hcd 0000:09:00.0: HC died; cleaning up
usb 13-2: USB disconnect, device number 2

But it is fixing an issue. thanks :)

On Wed, Oct 15, 2025 at 1:36 PM Michal Pecio <michal.pecio@...il.com> wrote:
>
> Return buffers if streaming fails to start due to uvc_pm_get() error.
>
> This bug may be responsible for a warning I got running
>
>     while :; do yavta -c3 /dev/video0; done
>
> on an xHCI controller which failed under this workload.
> I had no luck reproducing this warning again to confirm.
>
> xhci_hcd 0000:09:00.0: HC died; cleaning up
> usb 13-2: USB disconnect, device number 2
> WARNING: CPU: 2 PID: 29386 at drivers/media/common/videobuf2/videobuf2-core.c:1803 vb2_start_streaming+0xac/0x120
>
> Fixes: 7dd56c47784a ("media: uvcvideo: Remove stream->is_streaming field")
> Cc: stable@...r.kernel.org
> Signed-off-by: Michal Pecio <michal.pecio@...il.com>
Reviewed-by: Ricardo Ribalda <ribalda@...omium.org>

> ---
>  drivers/media/usb/uvc/uvc_queue.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/uvc/uvc_queue.c b/drivers/media/usb/uvc/uvc_queue.c
> index 790184c9843d..f49c538618bc 100644
> --- a/drivers/media/usb/uvc/uvc_queue.c
> +++ b/drivers/media/usb/uvc/uvc_queue.c
> @@ -177,7 +177,7 @@ static int uvc_start_streaming_video(struct vb2_queue *vq, unsigned int count)
>
>         ret = uvc_pm_get(stream->dev);
>         if (ret)
> -               return ret;
> +               goto return_buffers;
>
>         queue->buf_used = 0;
>
> @@ -187,6 +187,7 @@ static int uvc_start_streaming_video(struct vb2_queue *vq, unsigned int count)
>
>         uvc_pm_put(stream->dev);
>
> +return_buffers:
>         uvc_queue_return_buffers(queue, UVC_BUF_STATE_QUEUED);
>
>         return ret;
> --
> 2.48.1
>


--
Ricardo Ribalda

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ