linux/drivers/media
Anirudh Rayabharam f8194e5e63 media: pvrusb2: fix warning in pvr2_i2c_core_done
syzbot has reported the following warning in pvr2_i2c_done:

	sysfs group 'power' not found for kobject '1-0043'

When the device is disconnected (pvr_hdw_disconnect), the i2c adapter is
not unregistered along with the USB and v4l2 teardown. As part of the USB
device disconnect, the sysfs files of the subdevices are also deleted.
So, by the time pvr_i2c_core_done is called by pvr_context_destroy, the
sysfs files have been deleted.

To fix this, unregister the i2c adapter too in pvr_hdw_disconnect. Make
the device deregistration code shared by calling pvr_hdw_disconnect from
pvr2_hdw_destroy.

Reported-by: syzbot+e74a998ca8f1df9cc332@syzkaller.appspotmail.com
Tested-by: syzbot+e74a998ca8f1df9cc332@syzkaller.appspotmail.com
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Anirudh Rayabharam <mail@anirudhrb.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-05-19 09:51:39 +02:00
..
cec media: s5p: fix pm_runtime_get_sync() usage count 2021-05-10 11:36:33 +02:00
common media: flexcop: avoid -Wempty-body warning 2021-04-09 13:05:01 +02:00
dvb-core media: dvbdev: Fix memory leak in dvb_media_device_free() 2021-03-22 23:36:39 +01:00
dvb-frontends media: rtl2832_sdr/vivid/airspy/hackrf/msi2500: drop memset of fmt.sdr.reserved 2021-05-19 09:51:39 +02:00
firewire module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
i2c media: I2C: change 'RST' to "RSET" to fix multiple build errors 2021-05-19 09:51:39 +02:00
mc media: mc: mc-entity.c: Fix typo 2021-05-19 09:51:39 +02:00
mmc media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
pci media: cobalt: fix race condition in setting HPD 2021-05-19 09:51:39 +02:00
platform media: qcom/camss: Use devm_platform_ioremap_resource_byname 2021-05-19 09:51:39 +02:00
radio media: radio-si476x: rectify spelling and grammar 2021-03-22 11:58:42 +01:00
rc media updates for v5.13-rc1 2021-04-28 09:24:36 -07:00
spi media: use getter/setter functions 2021-03-11 11:59:42 +01:00
test-drivers media: rtl2832_sdr/vivid/airspy/hackrf/msi2500: drop memset of fmt.sdr.reserved 2021-05-19 09:51:39 +02:00
tuners media: m88rs6000t: avoid potential out-of-bounds reads on arrays 2021-03-22 17:41:39 +01:00
usb media: pvrusb2: fix warning in pvr2_i2c_core_done 2021-05-19 09:51:39 +02:00
v4l2-core drm for 5.13-rc1 2021-04-28 10:01:40 -07:00
Kconfig media: Correct 'so' 2021-03-22 11:52:09 +01:00
Makefile media: media/test_drivers: rename to test-drivers 2020-04-16 10:38:31 +02:00