mirror-linux/drivers/usb/gadget/function
Frederic Weisbecker e5644be407 usb: gadget: uvc: Fix unstarted kthread worker
The behaviour of kthread_create_worker() was recently changed to align
with the one of kthread_create(). The kthread worker is created but not
awaken by default. This is to allow the use of kthread_affine_preferred()
and kthread_bind[_mask]() with kthread workers. In order to keep the
old behaviour and wake the kthread up, kthread_run_worker() must be
used. All the pre-existing users have been converted, except for UVC
that was introduced in the same merge window as the API change.

This results in hangs:

	INFO: task UVCG:82 blocked for more than 491 seconds.
	Tainted: G                T  6.13.0-rc2-00014-gb04e317b5226 #1
	task:UVCG            state:D stack:0     pid:82
	 Call Trace:
	 __schedule
	 schedule
	 schedule_preempt_disabled
	 kthread
	 ? kthread_flush_work
	 ret_from_fork
	 ret_from_fork_asm
	 entry_INT80_32

Fix this with converting UVCG kworker to the new API.

Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202502121025.55bfa801-lkp@intel.com
Fixes: f0bbfbd16b ("usb: gadget: uvc: rework to enqueue in pump worker from encoded queue")
Cc: stable <stable@kernel.org>
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lore.kernel.org/r/20250212135514.30539-1-frederic@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-02-14 09:26:00 +01:00
..
Makefile usb: gadget: uvc: add trace of enqueued and completed requests 2024-10-17 08:42:23 +02:00
f_acm.c usb: gadget: f_acm: make bInterfaceProtocol configurable 2024-09-03 09:54:16 +02:00
f_ecm.c USB: gadget: Use str_enable_disable-like helpers 2025-01-15 18:28:13 +01:00
f_eem.c
f_fs.c usb: gadget: f_fs: Remove WARN_ON in functionfs_bind 2024-12-23 18:54:34 +01:00
f_hid.c usb: gadget: function: move u_f.h to include/linux/usb/func_utils.h 2024-09-03 09:57:08 +02:00
f_loopback.c usb: gadget: function: move u_f.h to include/linux/usb/func_utils.h 2024-09-03 09:57:08 +02:00
f_mass_storage.c drivers/usb/gadget: refactor min with min_t 2024-11-13 15:09:50 +01:00
f_mass_storage.h
f_midi.c USB: gadget: f_midi: f_midi_complete to call queue_work 2025-02-14 09:24:20 +01:00
f_midi2.c usb: gadget: midi2: Fix interpretation of is_midi1 bits 2024-12-04 16:26:34 +01:00
f_ncm.c USB: gadget: Use str_enable_disable-like helpers 2025-01-15 18:28:13 +01:00
f_obex.c
f_phonet.c
f_printer.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
f_rndis.c
f_serial.c
f_sourcesink.c usb: gadget: function: move u_f.h to include/linux/usb/func_utils.h 2024-09-03 09:57:08 +02:00
f_subset.c
f_tcm.c usb: gadget: f_tcm: Refactor goto check_condition 2024-12-24 08:56:08 +01:00
f_uac1.c
f_uac1_legacy.c
f_uac2.c usb: gadget: f_uac2: Fix incorrect setting of bNumEndpoints 2024-12-23 18:50:28 +01:00
f_uvc.c usb: gadget: uvc: rework to enqueue in pump worker from encoded queue 2024-10-17 08:42:22 +02:00
f_uvc.h
g_zero.h
ndis.h
rndis.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
rndis.h
storage_common.c
storage_common.h usb: storage: add a macro for the upper limit of max LUN 2024-12-04 16:33:54 +01:00
tcm.h usb: gadget: f_tcm: Stall on invalid CBW 2024-12-24 08:56:07 +01:00
u_audio.c
u_audio.h
u_ecm.h
u_eem.h
u_ether.c
u_ether.h
u_ether_configfs.h
u_fs.h
u_gether.h
u_hid.h
u_midi.h
u_midi2.h
u_ncm.h
u_phonet.h
u_printer.h
u_rndis.h
u_serial.c Revert "usb: gadget: u_serial: Disable ep before setting port to null to fix the crash caused by port being null" 2025-01-17 12:41:16 +01:00
u_serial.h usb: gadget: f_acm: make bInterfaceProtocol configurable 2024-09-03 09:54:16 +02:00
u_tcm.h
u_uac1.h
u_uac1_legacy.c
u_uac1_legacy.h
u_uac2.h
u_uvc.h
uac_common.h
uvc.h usb: gadget: uvc: set nbuffers to minimum STREAMING_MIN_BUFFERS in uvc_queue_setup 2024-10-17 08:42:23 +02:00
uvc_configfs.c usb: gadget: uvc: configfs: Add frame-based frame format support 2024-10-16 10:45:47 +02:00
uvc_configfs.h usb: gadget: uvc: configfs: Add frame-based frame format support 2024-10-16 10:45:47 +02:00
uvc_queue.c usb: gadget: uvc: set nbuffers to minimum STREAMING_MIN_BUFFERS in uvc_queue_setup 2024-10-17 08:42:23 +02:00
uvc_queue.h usb: gadget: uvc: set req_length based on payload by nreqs instead of req_size 2024-10-17 08:42:22 +02:00
uvc_trace.c usb: gadget: uvc: add trace of enqueued and completed requests 2024-10-17 08:42:23 +02:00
uvc_trace.h usb: gadget: uvc: add trace of enqueued and completed requests 2024-10-17 08:42:23 +02:00
uvc_v4l2.c usb: gadget: uvc: dont call usb_composite_setup_continue when not streaming 2024-10-17 08:42:23 +02:00
uvc_v4l2.h
uvc_video.c usb: gadget: uvc: Fix unstarted kthread worker 2025-02-14 09:26:00 +01:00
uvc_video.h