linux-stable/drivers/misc
Srinivas Kandagatla 2d10d2d170 misc: fastrpc: fix memory leak from miscdev->name
Fix a memory leak in miscdev->name by using devm_variant

Orignally reported by kmemleak:
    [<ffffff80088b74d8>] kmemleak_alloc+0x50/0x84
    [<ffffff80081e015c>] __kmalloc_track_caller+0xe8/0x168
    [<ffffff8008371ab0>] kvasprintf+0x78/0x100
    [<ffffff8008371c6c>] kasprintf+0x50/0x74
    [<ffffff8008507f2c>] fastrpc_rpmsg_probe+0xd8/0x20c
    [<ffffff80086b63b4>] rpmsg_dev_probe+0xa8/0x148
    [<ffffff80084de50c>] really_probe+0x208/0x248
    [<ffffff80084de2dc>] driver_probe_device+0x98/0xc0
    [<ffffff80084dec6c>] __device_attach_driver+0x9c/0xac
    [<ffffff80084dca8c>] bus_for_each_drv+0x60/0x8c
    [<ffffff80084de64c>] __device_attach+0x8c/0x100
    [<ffffff80084de6e0>] device_initial_probe+0x20/0x28
    [<ffffff80084dcbd0>] bus_probe_device+0x34/0x7c
    [<ffffff80084da32c>] device_add+0x420/0x498
    [<ffffff80084da680>] device_register+0x24/0x2c

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20191009144123.24583-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 15:28:11 +02:00
..
altera-stapl
c2port treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cardreader misc: rtsx: Remove unneeded variable in rts5260_card_power_on 2019-10-10 15:24:20 +02:00
cb710 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cxl powerpc/64s/radix: introduce options to disable use of the tlbie instruction 2019-09-05 14:22:41 +10:00
echo
eeprom eeprom: Warn that the driver is deprecated 2019-10-04 17:56:27 +02:00
genwqe Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
habanalabs habanalabs: correctly cast variable to __le32 2019-09-05 14:55:28 +03:00
ibmasm Merge branch 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-07-19 10:42:02 -07:00
lis3lv02d lis3lv02d: switch to using input device polling mode 2019-10-10 15:24:19 +02:00
lkdtm Merge 5.3-rc7 into char-misc-next 2019-09-02 19:30:09 +02:00
mei mei: me: fix me_intr_clear function name in KDoc 2019-10-08 09:46:06 +02:00
mic misc: MIC: drop all 'comment' lines from its Kconfig 2019-10-10 15:24:20 +02:00
ocxl powerpc/64s/radix: introduce options to disable use of the tlbie instruction 2019-09-05 14:22:41 +10:00
sgi-gru sgi-gru: simplify procfs code some more 2019-10-10 15:24:19 +02:00
sgi-xp Char/Misc driver patches for 5.4-rc1 2019-09-18 11:14:31 -07:00
ti-st drivers/misc: ti-st: Remove unneeded variable in st_tty_open 2019-10-04 15:14:37 +02:00
vmw_vmci VMCI: Release resource if the work is already queued 2019-08-28 22:57:07 +02:00
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
apds9802als.c
atmel-ssc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
atmel_tclib.c misc: atmel_tclib: use devm_platform_ioremap_resource() to simplify code 2019-10-10 15:24:19 +02:00
bh1770glc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
cs5535-mfgpt.c
ds1682.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
dummy-irq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
enclosure.c
fastrpc.c misc: fastrpc: fix memory leak from miscdev->name 2019-10-10 15:28:11 +02:00
hmc6352.c
hpilo.c
hpilo.h
ibmvmc.c
ibmvmc.h
ics932s401.c
isl29003.c
isl29020.c
Kconfig lis3lv02d: switch to using input device polling mode 2019-10-10 15:24:19 +02:00
kgdbts.c
lattice-ecp3-config.c
Makefile Char/Misc driver patches for 5.4-rc1 2019-09-18 11:14:31 -07:00
pch_phub.c
pci_endpoint_test.c dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
phantom.c
pti.c
pvpanic.c
qcom-coincell.c
sram-exec.c
sram.c
sram.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
tifm_7xx1.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
tifm_core.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
tsl2550.c
vexpress-syscfg.c
vmw_balloon.c vmw_balloon: Fix offline page marking with compaction 2019-08-28 22:57:07 +02:00
xilinx_sdfec.c misc: xilinx_sdfec: fix spelling mistake: "Schdule" -> "Schedule" 2019-08-22 14:28:10 -07:00