linux/drivers/misc
Wang Hai bf9efd4118 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:14:55 +02:00
..
altera-stapl altera-stapl: altera_get_note: prevent write beyond end of 'key' 2020-03-25 08:06:07 +01:00
c2port
cardreader misc: rtsx: Add short delay after exit from ASPM 2020-05-27 17:37:43 +02:00
cb710 cb710: Convert to new IDA API 2018-08-21 23:54:18 -04:00
cxl cxl: Fix kobject memleak 2020-08-19 08:14:55 +02:00
echo misc: echo: Remove unnecessary parentheses and simplify check for zero 2020-04-17 10:48:55 +02:00
eeprom eeprom: at24: make spd world-readable again 2019-08-06 19:06:57 +02:00
genwqe misc: genwqe: should return proper error value. 2019-11-20 18:47:31 +01:00
ibmasm ibmasm: don't write out of bounds in read handler 2018-07-07 09:59:35 +02:00
lis3lv02d vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
lkdtm lkdtm: support llvm-objcopy 2019-07-14 08:11:21 +02:00
mei mei: bus: don't clean driver pointer 2020-07-22 09:32:11 +02:00
mic mic: avoid statically declaring a 'struct device'. 2020-01-27 14:51:02 +01:00
ocxl ocxl: Fix endiannes bug in read_afu_name() 2019-01-09 17:38:43 +01:00
sgi-gru drivers/misc/sgi-gru: fix Spectre v1 vulnerability 2018-11-27 16:13:10 +01:00
sgi-xp misc: sgi-xp: Properly initialize buf in xpc_get_rsvd_page_pa 2020-01-27 14:50:51 +01:00
ti-st misc: ti-st: Fix memory leak in the error path of probe() 2018-08-02 10:35:04 +02:00
vmw_vmci VMCI: Release resource if the work is already queued 2019-09-06 10:22:20 +02:00
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
aspeed-lpc-ctrl.c misc: aspeed-lpc-ctrl: Enable FWH and A2H bridge cycles 2018-03-15 18:20:51 +01:00
aspeed-lpc-snoop.c soc: aspeed: Fix snoop_file_poll()'s return type 2020-01-27 14:49:53 +01:00
atmel_tclib.c
atmel-ssc.c misc: atmel-ssc: lock with mutex instead of spinlock 2020-07-22 09:32:12 +02:00
bh1770glc.c
cs5535-mfgpt.c
ds1682.c misc: ds1682: Ignore update-in-progress ETC reads 2018-01-09 17:03:57 +01:00
dummy-irq.c
enclosure.c scsi: enclosure: Fix stale device oops with hot replug 2020-01-17 19:47:03 +01:00
fsa9480.c misc: fsa9480: Add blank line after declarations. 2018-01-09 17:03:57 +01:00
hmc6352.c misc: hmc6352: fix potential Spectre v1 2018-09-12 09:31:00 +02:00
hpilo.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
hpilo.h
ibmvmc.c misc: ibmvsm: Fix potential NULL pointer dereference 2019-01-31 08:14:35 +01:00
ibmvmc.h misc: IBM Virtual Management Channel Driver (VMC) 2018-05-14 16:35:42 +02:00
ics932s401.c
ioc4.c
isl29003.c
isl29020.c
Kconfig misc: IBM Virtual Management Channel Driver (VMC) 2018-05-14 16:35:42 +02:00
kgdbts.c misc: kgdbts: Fix restrict error 2019-11-20 18:47:31 +01:00
lattice-ecp3-config.c
Makefile misc: IBM Virtual Management Channel Driver (VMC) 2018-05-14 16:35:42 +02:00
pch_phub.c PCI: Move Rohm Vendor ID to generic list 2020-06-22 09:05:23 +02:00
pci_endpoint_test.c PCI: Add Synopsys endpoint EDDA Device ID 2020-06-22 09:05:24 +02:00
phantom.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
pti.c
qcom-coincell.c
spear13xx_pcie_gadget.c
sram-exec.c
sram.c misc: sram: enable clock before registering regions 2018-07-06 16:48:15 +02:00
sram.h
tifm_7xx1.c misc: tifm: Remove VLA 2018-04-23 13:31:27 +02:00
tifm_core.c
tsl2550.c tsl2550: fix lux1_input error in low light 2018-07-07 17:44:52 +02:00
vexpress-syscfg.c misc: vexpress: Off by one in vexpress_syscfg_exec() 2019-02-15 08:10:11 +01:00
vmw_balloon.c Merge 4.18-rc5 into char-misc-next 2018-07-16 09:04:54 +02:00