Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
* [PATCH v2 0/2] usb: gadget: uvc: fix resource leak on video->async_wq and video->kworker
@ 2026-09-23 10:39 Xu Yang
  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
  0 siblings, 2 replies; 5+ messages in thread
From: Xu Yang @ 2026-09-23 10:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Kai Aizen, Michael Grzeschik
  Cc: linux-usb, linux-kernel, imx, Xu Yang, Frank Li

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>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-23 10:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-23 10:39 [PATCH v2 0/2] usb: gadget: uvc: fix resource leak on video->async_wq and video->kworker Xu Yang
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:45   ` sashiko-bot
2026-09-23 10:39 ` [PATCH v2 2/2] usb: gadget: uvc: refactor video cleanup into uvcg_video_deinit() Xu Yang
2026-09-23 10:51   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox