public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] uvc: Fix race condition on uvc
@ 2022-12-13 14:35 Ricardo Ribalda
  2022-12-13 14:35 ` [PATCH v2 1/2] media: uvcvideo: Fix race condition with usb_kill_urb Ricardo Ribalda
  2022-12-13 14:35 ` [PATCH v2 2/2] media: uvcvideo: Do not alloc dev->status Ricardo Ribalda
  0 siblings, 2 replies; 7+ messages in thread
From: Ricardo Ribalda @ 2022-12-13 14:35 UTC (permalink / raw)
  To: Max Staudt, Sergey Senozhatsky, Yunke Cao, Laurent Pinchart,
	Mauro Carvalho Chehab
  Cc: linux-media, stable, linux-kernel, Ricardo Ribalda

Make sure that all the async work is finished when we stop the status urb.

To: Yunke Cao <yunkec@chromium.org>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Max Staudt <mstaudt@google.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>

---
Changes in v2:
- Add a patch for not kalloc dev->status
- Redo the logic mechanism, so it also works with suspend (Thanks Yunke!)
- Link to v1: https://lore.kernel.org/r/20221212-uvc-race-v1-0-c52e1783c31d@chromium.org

---
Ricardo Ribalda (2):
      media: uvcvideo: Fix race condition with usb_kill_urb
      media: uvcvideo: Do not alloc dev->status

 drivers/media/usb/uvc/uvc_ctrl.c   |  3 +++
 drivers/media/usb/uvc/uvc_status.c | 15 +++++++--------
 drivers/media/usb/uvc/uvcvideo.h   |  3 ++-
 3 files changed, 12 insertions(+), 9 deletions(-)
---
base-commit: 0ec5a38bf8499f403f81cb81a0e3a60887d1993c
change-id: 20221212-uvc-race-09276ea68bf8

Best regards,
-- 
Ricardo Ribalda <ribalda@chromium.org>

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

end of thread, other threads:[~2022-12-14  6:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-13 14:35 [PATCH v2 0/2] uvc: Fix race condition on uvc Ricardo Ribalda
2022-12-13 14:35 ` [PATCH v2 1/2] media: uvcvideo: Fix race condition with usb_kill_urb Ricardo Ribalda
2022-12-14  4:04   ` Yunke Cao
2022-12-13 14:35 ` [PATCH v2 2/2] media: uvcvideo: Do not alloc dev->status Ricardo Ribalda
2022-12-14  0:39   ` Sergey Senozhatsky
2022-12-14  5:57     ` Ricardo Ribalda
2022-12-14  6:02       ` Sergey Senozhatsky

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