linux-stable/drivers/media/usb
Dongliang Mu 440722ab7c media: hdpvr: initialize dev->worker at hdpvr_register_videodev
[ Upstream commit 07922937e9 ]

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 13:58:45 +02:00
..
airspy media: usb: airspy: clean the freed pointer and counter 2021-09-30 10:07:54 +02:00
as102
au0828 media: au0828-i2c: drop a duplicated function 2021-11-29 13:23:14 +01:00
b2c2 media: b2c2-flexcop-usb: fix some whitespace coding style 2021-12-14 16:19:04 +01:00
cpia2 media: cpia2: fix control-message timeouts 2021-11-19 06:05:12 +00:00
cx231xx
dvb-usb media: dw2102: Fix use after free 2021-12-14 15:09:14 +01:00
dvb-usb-v2 media: lmedm04: don't ignore errors when setting a filter 2021-11-29 13:23:14 +01:00
em28xx media: Revert "media: em28xx: add missing em28xx_close_extension" 2022-04-08 13:58:45 +02:00
go7007 media: usb: go7007: s2250-board: fix leak in probe() 2022-04-08 13:57:47 +02:00
gspca media: drivers:usb:remove unneeded variable 2021-12-14 16:19:04 +01:00
hackrf media: rtl2832_sdr/vivid/airspy/hackrf/msi2500: drop memset of fmt.sdr.reserved 2021-05-19 09:51:39 +02:00
hdpvr media: hdpvr: initialize dev->worker at hdpvr_register_videodev 2022-04-08 13:58:45 +02:00
msi2500 media: rtl2832_sdr/vivid/airspy/hackrf/msi2500: drop memset of fmt.sdr.reserved 2021-05-19 09:51:39 +02:00
pvrusb2 media: pvrusb2: fix inconsistent indenting 2021-11-30 12:24:31 +01:00
pwc treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
s2255 media: s2255: fix control-message timeouts 2021-11-19 06:08:32 +00:00
siano media: siano: remove duplicate USB device IDs 2021-12-07 11:29:58 +01:00
stk1160 media: stk1160: If start stream fails, return buffers with VB2_BUF_STATE_QUEUED 2022-04-08 13:57:51 +02:00
stkwebcam media: usb: stkwebcam: Update the reference count of the usb device structure 2021-09-30 10:07:58 +02:00
tm6000 media: tm6000: Avoid card name truncation 2021-09-30 10:08:00 +02:00
ttusb-budget
ttusb-dec media: ttusb-dec: avoid release of non-acquired mutex 2021-09-30 10:07:40 +02:00
usbtv media updates for v5.13-rc1 2021-04-28 09:24:36 -07:00
uvc media: Revert "media: uvcvideo: Set unique vdev name based in type" 2021-12-14 16:19:03 +01:00
zr364xx media: zr364xx: fix memory leak in zr364xx_start_readpipe 2021-06-02 13:35:15 +02:00
Kconfig media: move ttpci-eeprom to common 2021-06-02 11:16:15 +02:00
Makefile