1
0
Fork 0
alistair23-linux/drivers/misc
Wang Hai db377d8caf cxl: Fix kobject memleak
[ Upstream commit 85c5cbeba8 ]

Currently the error return path from kobject_init_and_add() is not
followed by a call to kobject_put() - which means we are leaking
the kobject.

Fix it by adding a call to kobject_put() in the error path of
kobject_init_and_add().

Fixes: b087e6190d ("cxl: Export optional AFU configuration record in sysfs")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Acked-by: Andrew Donnellan <ajd@linux.ibm.com>
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
Link: https://lore.kernel.org/r/20200602120733.5943-1-wanghai38@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-08-19 08:16:08 +02:00
..
altera-stapl altera-stapl: altera_get_note: prevent write beyond end of 'key' 2020-03-25 08:25:47 +01:00
c2port
cardreader misc: rtsx: Add short delay after exit from ASPM 2020-05-27 17:46:46 +02:00
cb710
cxl cxl: Fix kobject memleak 2020-08-19 08:16:08 +02:00
echo
eeprom Merge branch 'i2c/for-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-09-24 16:48:02 -07:00
genwqe
habanalabs habanalabs: Align protection bits configuration of all TPCs 2020-07-22 09:33:05 +02:00
ibmasm
lis3lv02d
lkdtm lkdtm/bugs: fix build error in lkdtm_UNSET_SMEP 2020-02-05 21:22:46 +00:00
mei mei: bus: don't clean driver pointer 2020-07-22 09:33:13 +02:00
mic
ocxl ocxl: Fix potential memory leak on context creation 2020-01-12 12:21:31 +01:00
sgi-gru
sgi-xp
ti-st
vmw_vmci
Kconfig
Makefile
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
atmel-ssc.c misc: atmel-ssc: lock with mutex instead of spinlock 2020-07-22 09:33:15 +02:00
atmel_tclib.c
bh1770glc.c
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
enclosure.c scsi: enclosure: Fix stale device oops with hot replug 2020-01-17 19:48:42 +01:00
fastrpc.c misc: fastrpc: fix potential fastrpc_invoke_ctx leak 2020-06-24 17:50:13 +02:00
hmc6352.c
hpilo.c
hpilo.h
ibmvmc.c
ibmvmc.h
ics932s401.c
isl29003.c
isl29020.c
kgdbts.c
lattice-ecp3-config.c
pch_phub.c
pci_endpoint_test.c misc: pci_endpoint_test: Avoid using module parameter to determine irqtype 2020-04-08 09:08:41 +02:00
phantom.c
pti.c
pvpanic.c
qcom-coincell.c
sram-exec.c
sram.c
sram.h
tifm_7xx1.c
tifm_core.c
tsl2550.c
vexpress-syscfg.c
vmw_balloon.c
xilinx_sdfec.c misc: xilinx-sdfec: improve get_user_pages_fast() error handling 2020-06-24 17:50:35 +02:00