kernel_optimize_test/drivers/media/usb
Dongliang Mu 808990afd8 media: hdpvr: initialize dev->worker at hdpvr_register_videodev
[ Upstream commit 07922937e9a580825f9965c46fd15e23ba5754b6 ]

hdpvr_register_videodev is responsible to initialize a worker in
hdpvr_device. However, the worker is only initialized at
hdpvr_start_streaming other than hdpvr_register_videodev.
When hdpvr_probe does not initialize its worker, the hdpvr_disconnect
will encounter one WARN in flush_work.The stack trace is as follows:

 hdpvr_disconnect+0xb8/0xf2 drivers/media/usb/hdpvr/hdpvr-core.c:425
 usb_unbind_interface+0xbf/0x3a0 drivers/usb/core/driver.c:458
 __device_release_driver drivers/base/dd.c:1206 [inline]
 device_release_driver_internal+0x22a/0x230 drivers/base/dd.c:1237
 bus_remove_device+0x108/0x160 drivers/base/bus.c:529
 device_del+0x1fe/0x510 drivers/base/core.c:3592
 usb_disable_device+0xd1/0x1d0 drivers/usb/core/message.c:1419
 usb_disconnect+0x109/0x330 drivers/usb/core/hub.c:2228

Fix this by moving the initialization of dev->worker to the starting of
hdpvr_register_videodev

Reported-by: syzkaller <syzkaller@googlegroups.com>
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-08 14:40:36 +02:00
..
airspy
as102
au0828 media: au0828: fix a NULL vs IS_ERR() check 2021-07-14 16:56:05 +02:00
b2c2 media: flexcop-usb: fix control-message timeouts 2022-01-27 10:53:42 +01:00
cpia2 media: cpia2: fix control-message timeouts 2022-01-27 10:53:42 +01:00
cx231xx
dvb-usb media: m920x: don't use stack on USB reads 2022-01-27 10:54:14 +01:00
dvb-usb-v2 media: mxl111sf: change mutex_init() location 2021-12-22 09:30:58 +01:00
em28xx media: Revert "media: em28xx: add missing em28xx_close_extension" 2022-04-08 14:40:36 +02:00
go7007 media: usb: go7007: s2250-board: fix leak in probe() 2022-04-08 14:40:07 +02:00
gspca media: gspca/sunplus: fix zero-length control requests 2021-07-19 09:45:02 +02:00
hackrf
hdpvr media: hdpvr: initialize dev->worker at hdpvr_register_videodev 2022-04-08 14:40:36 +02:00
msi2500 media: msi2500: assign SPI bus number dynamically 2020-12-26 16:02:45 +01:00
pvrusb2 media: pvrusb2: fix control-message timeouts 2022-01-27 10:53:43 +01:00
pwc media: pwc: Use correct device for DMA 2021-02-23 15:53:25 +01:00
s2255 media: s2255: fix control-message timeouts 2022-01-27 10:53:42 +01:00
siano
stk1160 media: stk1160: If start stream fails, return buffers with VB2_BUF_STATE_QUEUED 2022-04-08 14:40:09 +02:00
stkwebcam media: stkwebcam: fix memory leak in stk_camera_probe 2021-09-08 08:49:02 +02:00
tm6000 media: tm6000: Avoid card name truncation 2021-11-18 14:04:05 +01:00
ttusb-budget
ttusb-dec
usbtv media: usbtv: Fix deadlock on suspend 2021-03-17 17:06:20 +01:00
uvc media: uvcvideo: Increase UVC_CTRL_CONTROL_TIMEOUT to 5 seconds. 2022-01-27 10:54:14 +01:00
zr364xx media: drivers/media/usb: fix memory leak in zr364xx_probe 2021-08-26 08:35:34 -04:00
Kconfig
Makefile