kernel_optimize_test/drivers/media/radio
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
..
si470x Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
si4713 Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
wl128x Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
dsbr100.c Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
Kconfig Linux 5.2-rc2 2019-05-28 11:21:51 -04:00
lm7000.h
Makefile
radio-aimslab.c
radio-aztech.c
radio-cadet.c media: media/radio: set device_caps in struct video_device 2019-06-05 08:19:12 -04:00
radio-gemtek.c
radio-isa.c Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
radio-isa.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
radio-keene.c Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
radio-ma901.c Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
radio-maxiradio.c
radio-miropcm20.c media: media/radio: set device_caps in struct video_device 2019-06-05 08:19:12 -04:00
radio-mr800.c Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
radio-raremono.c media: radio-raremono: change devm_k*alloc to k*alloc 2019-06-27 07:35:24 -04:00
radio-rtrack2.c
radio-sf16fmi.c media: media/radio: set device_caps in struct video_device 2019-06-05 08:19:12 -04:00
radio-sf16fmr2.c
radio-shark.c
radio-shark2.c
radio-si476x.c Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
radio-tea5764.c Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
radio-tea5777.c Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
radio-tea5777.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
radio-terratec.c
radio-timb.c Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
radio-trust.c
radio-typhoon.c
radio-wl1273.c Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
radio-zoltrix.c
saa7706h.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
tea575x.c Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
tef6862.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00