kernel-ark/drivers/media/usb/dvb-usb-v2
Pavel Skripkin 44870a9e7a media: mxl111sf: change mutex_init() location
Syzbot reported, that mxl111sf_ctrl_msg() uses uninitialized
mutex. The problem was in wrong mutex_init() location.

Previous mutex_init(&state->msg_lock) call was in ->init() function, but
dvb_usbv2_init() has this order of calls:

	dvb_usbv2_init()
	  dvb_usbv2_adapter_init()
	    dvb_usbv2_adapter_frontend_init()
	      props->frontend_attach()

	  props->init()

Since mxl111sf_* devices call mxl111sf_ctrl_msg() in ->frontend_attach()
internally we need to initialize state->msg_lock before
frontend_attach(). To achieve it, ->probe() call added to all mxl111sf_*
devices, which will simply initiaize mutex.

Reported-and-tested-by: syzbot+5ca0bf339f13c4243001@syzkaller.appspotmail.com

Fixes: 8572211842 ("[media] mxl111sf: convert to new DVB USB")
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-09-30 10:08:01 +02:00
..
af9015.c media: usb: dvb-usb-v2: Fix fall-through warnings for Clang 2021-01-27 12:55:20 +01:00
af9015.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
af9035.c media: usb: dvb-usb-v2: af9035: report if i2c client isn't bound 2021-07-12 14:28:28 +02:00
af9035.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
anysee.c media: anysee: simplify the return expression of anysee_ci_* function 2021-03-11 11:59:44 +01:00
anysee.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
au6610.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
au6610.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
az6007.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 238 2019-06-19 17:09:07 +02:00
ce6230.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
ce6230.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
dvb_usb_common.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
dvb_usb_core.c media: rtl28xxu: fix idle handling 2019-10-07 07:42:43 -03:00
dvb_usb_urb.c Linux 5.2-rc2 2019-05-28 11:21:51 -04:00
dvb_usb.h media: media/usb: fix kernel-doc header issues 2021-03-22 12:51:50 +01:00
dvbsky.c media: dvbsky: add support for MyGica T230C2_LITE and T230A 2021-07-12 09:16:29 +02:00
ec168.c media: dvb-usb-v2: use DVB_USB_DEVICE() macro 2020-04-22 07:42:15 +02:00
ec168.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
gl861.c media: Use fallthrough pseudo-keyword 2020-08-29 08:35:27 +02:00
Kconfig media: usb: dvb-usb-v2: af9035: let subdrv autoselect enable si2168 and si2157 2021-07-12 14:28:49 +02:00
lmedm04.c media: lmedm04: delete lme2510_get_adapter_count() 2021-05-23 19:21:30 +02:00
lmedm04.h media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
Makefile
mxl111sf-demod.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
mxl111sf-demod.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
mxl111sf-gpio.c media: Use fallthrough pseudo-keyword 2020-08-29 08:35:27 +02:00
mxl111sf-gpio.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
mxl111sf-i2c.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
mxl111sf-i2c.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
mxl111sf-phy.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
mxl111sf-phy.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
mxl111sf-reg.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
mxl111sf-tuner.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
mxl111sf-tuner.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
mxl111sf.c media: mxl111sf: change mutex_init() location 2021-09-30 10:08:01 +02:00
mxl111sf.h media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
rtl28xxu.c media: rtl28xxu: fix zero-length control request 2021-07-30 12:59:18 +02:00
rtl28xxu.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
usb_urb.c media: dvb-usb-v2: Fix incorrect use of transfer_flags URB_FREE_BUFFER 2018-12-03 13:23:24 -05:00
zd1301.c media: usb: dvb-usb-v2: zd1301: fix missing platform_device_unregister() 2020-11-17 06:57:29 +01:00