android_kernel_oneplus_msm8998/drivers
Luke Nowakowski-Krijger 56ea214b17 media: radio-raremono: change devm_k*alloc to k*alloc
commit c666355e60ddb4748ead3bdd983e3f7f2224aaf0 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-04 09:35:02 +02:00
..
accessibility
acpi ACPI / SBS: Fix GPE storm on recent MacBookPro's 2019-04-27 09:33:58 +02:00
amba
android coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping 2019-06-22 08:18:27 +02:00
ata libata: Extend quirks for the ST1000LM024 drives with NOLPM quirk 2019-06-22 08:18:22 +02:00
atm atm: he: fix sign-extension overflow on large shift 2019-03-23 08:44:16 +01:00
auxdisplay
base regmap: fix bulk writes on paged registers 2019-08-04 09:34:46 +02:00
bcma
block floppy: fix out-of-bounds read in copy_buffer 2019-08-04 09:34:52 +02:00
bluetooth Bluetooth: hci_bcsp: Fix memory leak in rx_skb 2019-08-04 09:34:48 +02:00
bus
cdrom cdrom: Fix race condition in cdrom_sysctl_register 2019-04-27 09:33:52 +02:00
char hpet: Fix division by zero in hpet_time_div() 2019-08-04 09:35:00 +02:00
clk clk: rockchip: Turn on "aclk_dmac1" for suspend on rk3288 2019-06-22 08:18:20 +02:00
clocksource clocksource/drivers/exynos_mct: Clear timer interrupt when shutdown 2019-03-23 08:44:35 +01:00
connector
cpufreq cpufreq: pmac32: fix possible object reference leak 2019-06-11 12:24:01 +02:00
cpuidle cpuidle: big.LITTLE: fix refcount leak 2019-02-20 10:13:09 +01:00
crypto crypto: talitos - fix skcipher failure due to wrong output IV 2019-08-04 09:34:40 +02:00
dca
devfreq PM / devfreq: tegra: fix error return code in tegra_devfreq_probe() 2018-11-10 07:41:40 -08:00
dio
dma dmaengine: imx-sdma: fix use-after-free on probe error path 2019-08-04 09:34:37 +02:00
dma-buf
edac EDAC: Fix global-out-of-bounds write when setting edac_mc_poll_msec 2019-08-04 09:34:48 +02:00
eisa
extcon extcon: arizona: Disable mic detect if running when driver is removed 2019-06-11 12:24:01 +02:00
firewire
firmware efi: stub: define DISABLE_BRANCH_PROFILING for all architectures 2019-04-03 06:23:20 +02:00
fmc
fpga
gpio gpio: omap: ensure irq is enabled before wakeup 2019-08-04 09:34:45 +02:00
gpu drm/virtio: Add memory barriers for capset cache. 2019-08-04 09:34:56 +02:00
hid HID: core: move Usage Page concatenation to Main item 2019-06-11 12:24:03 +02:00
hsi
hv Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels 2019-01-13 10:05:27 +01:00
hwmon hwmon: (pmbus/core) Treat parameters as paged if on multiple pages 2019-07-10 09:56:33 +02:00
hwspinlock
hwtracing intel_th: msu: Fix single mode with disabled IOMMU 2019-08-04 09:34:53 +02:00
i2c i2c: dev: fix potential memory leak in i2cdev_ioctl_rdwr 2019-06-22 08:18:26 +02:00
ide ide: pmac: add of_node_put() 2018-12-21 14:09:52 +01:00
idle
iio iio: common: ssp_sensors: Initialize calculated_time in ssp_common_process_data 2019-06-11 12:24:02 +02:00
infiniband coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping 2019-06-22 08:18:27 +02:00
input Input: gtco - bounds check collection indent level 2019-08-04 09:34:49 +02:00
iommu iommu/vt-d: Set intel_iommu_gfx_mapped correctly 2019-06-22 08:18:19 +02:00
ipack
irqchip irqchip/mmp: Only touch the PJ4 IRQ & FIQ bits on enable/disable 2019-03-23 08:44:27 +01:00
isdn ISDN: hfcsusb: checking idx of ep configuration 2019-08-04 09:35:01 +02:00
leds leds: lp55xx: fix null deref on firmware load failure 2019-04-27 09:33:51 +02:00
lguest
lightnvm
macintosh macintosh/via-pmu: Add missing mmio accessors 2018-09-19 22:48:57 +02:00
mailbox mailbox: handle failed named mailbox channel request 2019-08-04 09:34:58 +02:00
mcb
md dm bufio: fix deadlock with loop device 2019-08-04 09:34:53 +02:00
media media: radio-raremono: change devm_k*alloc to k*alloc 2019-08-04 09:35:02 +02:00
memory memory: tegra: Fix integer overflow on tick value calculation 2019-06-11 12:23:46 +02:00
memstick memstick: Fix error cleanup path of memstick_init 2019-08-04 09:34:56 +02:00
message
mfd mfd: arizona: Fix undefined behavior 2019-08-04 09:34:58 +02:00
misc VMCI: Fix integer overflow in VMCI handle arrays 2019-07-21 09:07:12 +02:00
mmc mmc: sdhci-of-esdhc: add erratum eSDHC-A001 and A-008358 support 2019-06-11 12:24:00 +02:00
mtd mtd: rawnand: gpmi: fix MX28 bus master lockup problem 2019-02-20 10:13:17 +01:00
net bonding: validate ip header before check IPPROTO_IGMP 2019-08-04 09:34:55 +02:00
nfc NFC: nxp-nci: Include unaligned.h instead of access_ok.h 2019-02-20 10:13:20 +01:00
ntb
nubus
nvdimm libnvdimm/btt: Fix a kmemdup failure check 2019-05-16 19:45:05 +02:00
nvme
nvmem nvmem: core: fix read buffer in place 2019-06-22 08:18:20 +02:00
of of: add helper to lookup compatible child node 2018-12-01 09:46:35 +01:00
oprofile
parisc parisc: Use implicit space register selection for loading the coherence index of I/O pdirs 2019-06-11 12:24:13 +02:00
parport parport: Fix mem leak in parport_register_dev_model 2019-07-10 09:56:31 +02:00
pci PCI: sysfs: Ignore lockdep for remove attribute 2019-08-04 09:34:57 +02:00
pcmcia pcmcia: Implement CLKRUN protocol disabling for Ricoh bridges 2018-11-21 09:27:30 +01:00
perf
phy phy: renesas: rcar-gen2: Fix memory leak at error paths 2019-08-04 09:34:57 +02:00
pinctrl pinctrl: rockchip: fix leaked of_node references 2019-08-04 09:34:56 +02:00
platform platform/chrome: cros_ec_proto: check for NULL transfer function 2019-06-22 08:18:20 +02:00
pnp
power power: supply: sysfs: prevent endless uevent loop with CONFIG_POWER_SUPPLY_DEBUG 2019-06-11 12:23:49 +02:00
powercap
pps
ps3
ptp ptp: check gettime64 return code in PTP_SYS_OFFSET ioctl 2019-02-20 10:13:05 +01:00
pwm pwm: Fix deadlock warning when removing PWM device 2019-06-22 08:18:21 +02:00
rapidio
ras
regulator regulator: s2mps11: Fix buck7 and buck8 wrong voltages 2019-08-04 09:34:50 +02:00
remoteproc
reset
rpmsg
rtc rtc: 88pm860x: prevent use-after-free on device remove 2019-06-11 12:23:54 +02:00
s390 s390/qdio: handle PENDING state for QEBSM devices 2019-08-04 09:34:45 +02:00
sbus drivers/sbus/char: add of_node_put() 2018-12-21 14:09:52 +01:00
scsi scsi: hpsa: correct ioaccel2 chaining 2019-07-10 09:56:41 +02:00
sfi
sh
sn
soc soc: mediatek: pwrap: Zero initialize rdata in pwrap_init_cipher 2019-06-22 08:18:20 +02:00
spi spi: bitbang: Fix NULL pointer dereference in spi_unregister_master 2019-07-10 09:56:39 +02:00
spmi
ssb ssb: Fix possible NULL pointer dereference in ssb_host_pcmcia_exit 2019-06-11 12:23:53 +02:00
staging media: staging: media: davinci_vpfe: - Fix for memory leak if decoder initialization fails. 2019-08-04 09:34:44 +02:00
target scsi: target/iscsi: Avoid iscsit_release_commands_from_conn() deadlock 2019-03-23 08:44:35 +01:00
tc TC: Set DMA masks for devices 2018-11-21 09:27:36 +01:00
thermal thermal/int340x_thermal: fix mode setting 2019-04-27 09:33:57 +02:00
thunderbolt
tty serial: sh-sci: Fix TX DMA buffer flushing and workqueue races 2019-08-04 09:34:58 +02:00
uio uio: Fix an Oops on load 2018-11-27 16:08:02 +01:00
usb usb: pci-quirks: Correct AMD PLL quirk detection 2019-08-04 09:35:00 +02:00
uwb uwb: hwa-rc: fix memory leak at probe 2018-10-10 08:52:04 +02:00
vfio vfio/pci: use correct format characters 2019-05-16 19:45:01 +02:00
vhost vhost_net: disable zerocopy by default 2019-08-04 09:34:46 +02:00
video video: imsttfb: fix potential NULL pointer dereferences 2019-06-22 08:18:21 +02:00
virt drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl 2019-05-16 19:45:18 +02:00
virtio virtio_balloon: fix another race between migration and ballooning 2018-08-06 16:24:42 +02:00
vlynq
vme
w1 w1: fix the resume command API 2019-06-11 12:23:55 +02:00
watchdog
xen fs: stream_open - opener for stream-like files so that read and write can run simultaneously without deadlock 2019-06-11 12:24:13 +02:00
zorro
Kconfig
Makefile