android_kernel_sony_sdm845/drivers/misc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Yang Yingliang 96fba6fb95 cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter()
[ Upstream commit 61c80d1c3833e196256fb060382db94f24d3d9a7 ]

If device_register() fails in cxl_register_afu|adapter(), the device
is not added, device_unregister() can not be called in the error path,
otherwise it will cause a null-ptr-deref because of removing not added
device.

As comment of device_register() says, it should use put_device() to give
up the reference in the error path. So split device_unregister() into
device_del() and put_device(), then goes to put dev when register fails.

Fixes: 14baf4d9c7 ("cxl: Add guest-specific code")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Acked-by: Andrew Donnellan <ajd@linux.ibm.com>
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>
Link: https://lore.kernel.org/r/20221111145440.2426970-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-07 12:07:25 +01:00
..
altera-stapl altera-stapl: altera_get_note: prevent write beyond end of 'key' 2020-04-02 17:20:22 +02:00
c2port
cb710 cb710: avoid NULL pointer subtraction 2021-10-27 09:33:57 +02:00
cxl cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter() 2023-01-07 12:07:25 +01:00
echo misc: echo: Remove unnecessary parentheses and simplify check for zero 2020-04-24 07:59:01 +02:00
eeprom misc: eeprom_93xx46: Add quirk to support Microchip 93LC46B eeprom 2021-03-11 13:48:03 +01:00
genwqe misc: genwqe: should return proper error value. 2019-11-25 09:52:54 +01:00
ibmasm misc/libmasm/module: Fix two use after free in ibmasm_init_one 2021-07-20 16:21:11 +02:00
lis3lv02d platform/x86: hp_accel: Avoid invoking _INI to speed up resume 2021-06-03 08:23:31 +02:00
mei mei: request autosuspend after sending rx flow control 2021-06-03 08:23:29 +02:00
mic misc: vop: add round_up(x,4) for vring_size to avoid kernel panic 2020-10-29 09:05:43 +01:00
sgi-gru misc: sgi-gru: fix use-after-free error in gru_set_context_option, gru_fault and gru_handle_user_call_os 2023-01-07 12:07:25 +01:00
sgi-xp misc: sgi-xp: Properly initialize buf in xpc_get_rsvd_page_pa 2020-01-29 10:24:25 +01:00
ti-st
vmw_vmci misc/vmw_vmci: fix an infoleak in vmci_host_do_receive_datagram() 2022-11-25 17:35:42 +01:00
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
arm-charlcd.c
atmel-ssc.c misc: atmel-ssc: Fix IRQ check in ssc_probe 2022-06-25 11:45:18 +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-23 08:19:35 +01:00
fsa9480.c
hmc6352.c
hpilo.c
hpilo.h
ics932s401.c
ioc4.c
isl29003.c
isl29020.c
Kconfig
kgdbts.c kgdbts: fix return value of __setup handler 2022-04-20 09:06:37 +02:00
lattice-ecp3-config.c misc: lattice-ecp3-config: Fix task hung when firmware load failed 2022-01-27 08:47:36 +01:00
lkdtm.h
lkdtm_bugs.c
lkdtm_core.c
lkdtm_heap.c
lkdtm_perms.c
lkdtm_rodata.c
lkdtm_usercopy.c lkdtm/usercopy: Expand size of "out of frame" object 2022-06-14 16:52:39 +02:00
Makefile
panel.c
pch_phub.c
phantom.c
pti.c
qcom-coincell.c
spear13xx_pcie_gadget.c
sram.c
ti_dac7512.c
tifm_7xx1.c misc: tifm: fix possible memory leak in tifm_7xx1_switch_media() 2023-01-07 12:07:25 +01:00
tifm_core.c
tsl2550.c
vexpress-syscfg.c
vmw_balloon.c