linux-stable/drivers/misc
Andrew Donnellan 8fbaa51d43 cxl: fix potential NULL dereference in free_adapter()
If kzalloc() fails when allocating adapter->guest in
cxl_guest_init_adapter(), we call free_adapter() before erroring out.
free_adapter() in turn attempts to dereference adapter->guest, which in
this case is NULL.

In free_adapter(), skip the adapter->guest cleanup if adapter->guest is
NULL.

Fixes: 14baf4d9c7 ("cxl: Add guest-specific code")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2016-07-19 20:12:29 +10:00
..
altera-stapl
c2port misc: c2port: use kobj_to_dev() 2016-02-07 23:01:45 -08:00
cb710
cxl cxl: fix potential NULL dereference in free_adapter() 2016-07-19 20:12:29 +10:00
echo
eeprom Char / Misc driver update for 4.7-rc1 2016-05-20 21:20:31 -07:00
genwqe GenWQE: use kobj_to_dev() 2016-02-08 14:57:30 -08:00
ibmasm mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
lis3lv02d misc: apds990x, bh1770glc, lis3lv02d: use to_i2c_client 2016-02-07 23:01:45 -08:00
mei mei: bus: call mei_cl_read_start under device lock 2016-05-03 15:07:35 -07:00
mic misc: mic: Remove return statements from void functions 2016-04-30 13:53:19 -07:00
sgi-gru x86/platform/UV: Remove Obsolete GRU MMR address translation 2016-05-04 08:48:51 +02:00
sgi-xp
ti-st ti-st: Fix complete_all() wrong usage 2016-05-01 14:20:04 -07:00
vmw_vmci mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
Kconfig Merge char-misc-next into staging-next 2016-02-22 14:46:24 -08:00
Makefile misc: Move panel driver out of staging 2016-02-03 14:14:22 -08:00
ad525x_dpot-i2c.c misc: ad525x_dpot: Remove unnecessary MODULE_ALIAS() 2015-09-20 19:33:29 -07:00
ad525x_dpot-spi.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
ad525x_dpot.c misc: ad525x_dpot: Fix the enabling of the "otpXen" attributes 2016-03-01 16:55:13 -08:00
ad525x_dpot.h
apds990x.c misc: apds990x, bh1770glc, lis3lv02d: use to_i2c_client 2016-02-07 23:01:45 -08:00
apds9802als.c
arm-charlcd.c drivers/misc: make arm-charlcd.c explicitly non-modular 2016-02-07 23:01:45 -08:00
atmel-ssc.c ASoC: atmel_ssc_dai: distinguish the different SSC 2016-03-02 23:43:11 +09:00
atmel_tclib.c misc: atmel_tclib: get and use slow clock 2015-10-06 12:33:14 +02:00
bh1770glc.c misc: apds990x, bh1770glc, lis3lv02d: use to_i2c_client 2016-02-07 23:01:45 -08:00
bh1780gli.c
bmp085-i2c.c
bmp085-spi.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
bmp085.c
bmp085.h
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
enclosure.c
fsa9480.c
hmc6352.c
hpilo.c misc: hpilo: Change e-mail address from hp.com to hpe.com 2015-10-04 12:42:33 +01:00
hpilo.h
ics932s401.c
ioc4.c
isl29003.c
isl29020.c
kgdbts.c drivers/misc: make kgdbts.c slightly more explicitly non-modular 2015-09-20 19:32:35 -07:00
lattice-ecp3-config.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
lkdtm.c lkdtm: do not leak free page on kmalloc failure 2016-04-06 16:22:25 -07:00
panel.c misc: panel, convert struct to bitmap 2016-02-11 19:24:23 -08:00
pch_phub.c pch_phub: return -ENODATA if ROM can't be mapped 2016-03-05 12:19:39 -08:00
phantom.c
pti.c
qcom-coincell.c ARM: qcom: silence an uninitialized variable warning 2016-05-01 14:20:04 -07:00
spear13xx_pcie_gadget.c spear13xx_pcie_gadget: use per-attribute show and store methods 2015-10-13 22:17:40 -07:00
sram.c misc: sram: fix check of devm_ioremap*() return value 2016-04-30 14:15:56 -07:00
ti_dac7512.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
tifm_7xx1.c
tifm_core.c
tsl2550.c
vexpress-syscfg.c
vmw_balloon.c mm, page_alloc: rename __GFP_WAIT to __GFP_RECLAIM 2015-11-06 17:50:42 -08:00