linux-stable/drivers/media
Luke Nowakowski-Krijger c666355e60 media: radio-raremono: change devm_k*alloc to k*alloc
Change devm_k*alloc to k*alloc to manually allocate memory

The manual allocation and freeing of memory is necessary because when
the USB radio is disconnected, the memory associated with devm_k*alloc
is freed. Meaning if we still have unresolved references to the radio
device, then we get use-after-free errors.

This patch fixes this by manually allocating memory, and freeing it in
the v4l2.release callback that gets called when the last radio device
exits.

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

Signed-off-by: Luke Nowakowski-Krijger <lnowakow@eng.ucsd.edu>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil-cisco@xs4all.nl: cleaned up two small checkpatch.pl warnings]
[hverkuil-cisco@xs4all.nl: prefix subject with driver name]
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-27 07:35:24 -04:00
..
cec media: cec-notifier: add new notifier functions 2019-06-27 07:19:43 -04:00
common media: media/pci: set device_caps in struct video_device 2019-06-24 14:57:12 -04:00
dvb-core media: dvb_frontend: split dvb_frontend_handle_ioctl function 2019-06-27 07:24:12 -04:00
dvb-frontends media: stv0297: fix frequency range limit 2019-06-27 07:33:09 -04:00
firewire treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
i2c media: st-mipid02: add support of JPEG 2019-06-24 13:04:58 -04:00
mc Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
mmc treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pci media: pci: cx88: Change the type of 'missed' to u64 2019-06-24 14:59:04 -04:00
platform media: cec: add struct cec_connector_info support 2019-06-27 07:18:43 -04:00
radio media: radio-raremono: change devm_k*alloc to k*alloc 2019-06-27 07:35:24 -04:00
rc media: rc: Prefer KEY_NUMERIC_* for number buttons on remotes 2019-06-27 07:30:28 -04:00
spi Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
tuners media: si2157: add detection of si2177 tuner 2019-06-13 14:26:59 -04:00
usb media: hdpvr: fix locking and a missing msleep 2019-06-24 15:02:01 -04:00
v4l2-core media: v4l2: Test type instead of cfg->type in v4l2_ctrl_new_custom() 2019-06-24 15:01:07 -04:00
Kconfig media: move drivers/media/media-* to drivers/media/mc/mc-* 2019-05-28 12:15:46 -04:00
Makefile media: move drivers/media/media-* to drivers/media/mc/mc-* 2019-05-28 12:15:46 -04:00