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>,
Frank Li <Frank.Li@nxp.com>
Subject: [PATCH v2 0/2] usb: gadget: uvc: fix resource leak on video->async_wq and video->kworker
Date: Wed, 23 Sep 2026 18:39:43 +0800 [thread overview]
Message-ID: <20260923-usb-uvc-fixes-v2-0-844e04a4a4b7@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>
---
Changes in v2:
- rebase to latest usb-testing
- add sob tags
- Link to v1: https://patch.msgid.link/20260821-usb-uvc-fixes-v1-0-80e6e279523d@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: d58dffe9ee2c8883193959ff4ef995ec07932874
change-id: 20260819-usb-uvc-fixes-3176195c148a
Best regards,
--
Xu Yang <xu.yang_2@nxp.com>
next reply other threads:[~2026-09-23 10:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 10:39 Xu Yang [this message]
2026-09-23 10:39 ` [PATCH v2 1/2] usb: gadget: uvc: replace mutex lock/unlock with scoped_guard in uvc_function_bind() Xu Yang
2026-09-23 10:39 ` [PATCH v2 2/2] usb: gadget: uvc: refactor video cleanup into uvcg_video_deinit() Xu Yang
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=20260923-usb-uvc-fixes-v2-0-844e04a4a4b7@nxp.com \
--to=xu.yang_2@oss.nxp.com \
--cc=Frank.Li@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®