android_kernel_motorola_sm6375/drivers/media
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Pavel Skripkin 96f182c9f4 media: mxl111sf: change mutex_init() location
commit 44870a9e7a3c24acbb3f888b2a7cc22c9bdf7e7f upstream.

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: [email protected]

Fixes: 8572211842 ("[media] mxl111sf: convert to new DVB USB")
Signed-off-by: Pavel Skripkin <[email protected]>
Signed-off-by: Sean Young <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-12-22 09:29:40 +01:00
..
cec media: cec: copy sequence field for the reply 2021-12-01 09:23:28 +01:00
common
dvb-core
dvb-frontends media: dvb-frontends: mn88443x: Handle errors of clk_prepare_enable() 2021-11-17 09:48:36 +01:00
firewire media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt() 2021-11-06 13:59:45 +01:00
i2c media: TDA1997x: handle short reads of hdmi info frame. 2021-11-17 09:48:35 +01:00
mc
mmc
pci media: cx23885: Fix snd_card_free call on null card pointer 2021-11-17 09:48:35 +01:00
platform media: mtk-vpu: Fix a resource leak in the error handling path of 'mtk_vpu_probe()' 2021-11-17 09:48:35 +01:00
radio media: si470x: Avoid card name truncation 2021-11-17 09:48:35 +01:00
rc media: mceusb: return without resubmitting URB in case of -EPROTO error. 2021-11-17 09:48:29 +01:00
spi media: cxd2880-spi: Fix a null pointer dereference on error handling path 2021-11-17 09:48:35 +01:00
tuners
usb media: mxl111sf: change mutex_init() location 2021-12-22 09:29:40 +01:00
v4l2-core media: v4l2-ioctl: Fix check_ext_ctrls 2021-11-17 09:48:18 +01:00
Kconfig
Makefile