From: Xu Yang <xu.yang_2@oss.nxp.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kai Aizen <kai.aizen.dev@gmail.com>,
Michael Grzeschik <mgr@kernel.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
imx@lists.linux.dev, Xu Yang <xu.yang_2@nxp.com>
Subject: [PATCH 0/2] usb: gadget: uvc: fix resource leak on video->async_wq and video->kworker
Date: Fri, 21 Aug 2026 16:22:35 +0800 [thread overview]
Message-ID: <20260821-usb-uvc-fixes-v1-0-80e6e279523d@nxp.com> (raw)
This patchset fixes the resource leak issue on uvc_function_bind() error
handling path and uvc_function_unbind(). For the former, video->async_wq
and video->kworker may never be destroyed. For the latter, video->kworker
needs to be destroyed.
Besides, patch#1 also fixes incorrect goto labels that could clean up
resources not yet initialized.
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
Xu Yang (2):
usb: gadget: uvc: replace mutex lock/unlock with scoped_guard in uvc_function_bind()
usb: gadget: uvc: refactor video cleanup into uvcg_video_deinit()
drivers/usb/gadget/function/f_uvc.c | 87 ++++++++++++++-------------------
drivers/usb/gadget/function/uvc_video.c | 15 ++++++
drivers/usb/gadget/function/uvc_video.h | 1 +
3 files changed, 54 insertions(+), 49 deletions(-)
---
base-commit: e1e6e541c5c9cf548e9fdc35fc26808c82074440
change-id: 20260819-usb-uvc-fixes-3176195c148a
Best regards,
--
Xu Yang <xu.yang_2@nxp.com>
next reply other threads:[~2026-08-21 8:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 8:22 Xu Yang [this message]
2026-08-21 8:22 ` [PATCH 1/2] usb: gadget: uvc: replace mutex lock/unlock with scoped_guard in uvc_function_bind() Xu Yang
2026-08-21 14:36 ` Frank Li
2026-08-21 8:22 ` [PATCH 2/2] usb: gadget: uvc: refactor video cleanup into uvcg_video_deinit() Xu Yang
2026-08-21 14:36 ` Frank Li
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=20260821-usb-uvc-fixes-v1-0-80e6e279523d@nxp.com \
--to=xu.yang_2@oss.nxp.com \
--cc=gregkh@linuxfoundation.org \
--cc=imx@lists.linux.dev \
--cc=kai.aizen.dev@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mgr@kernel.org \
--cc=xu.yang_2@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®