linux/drivers/misc
Daniel Axtens 2c069a118f cxl: Check if afu is not null in cxl_slbia
The pointer to an AFU in the adapter's list of AFUs can be null
if we're in the process of removing AFUs. The afu_list_lock
doesn't guard against this.

Say we have 2 slices, and we're in the process of removing cxl.
 - We remove the AFUs in order (see cxl_remove). In cxl_remove_afu
   for AFU 0, we take the lock, set adapter->afu[0] = NULL, and
   release the lock.
 - Then we get an slbia. In cxl_slbia we take the lock, and set
   afu = adapter->afu[0], which is NULL.
 - Therefore our attempt to check afu->enabled will blow up.

Therefore, check if afu is a null pointer before dereferencing it.

Cc: stable@vger.kernel.org
Signed-off-by: Daniel Axtens <dja@axtens.net>
Acked-by: Michael Neuling <mikey@neuling.org>
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2015-07-10 11:44:25 +10:00
..
altera-stapl drivers/misc/altera-stapl/altera.c: remove extraneous KERN_INFO prefix 2015-06-25 17:00:38 -07:00
c2port
cb710
cxl cxl: Check if afu is not null in cxl_slbia 2015-07-10 11:44:25 +10:00
echo
eeprom
genwqe GenWQE: remove unnecessary version.h inclusion 2015-01-12 05:04:11 -08:00
ibmasm
lis3lv02d kernel/params: constify struct kernel_param_ops uses 2015-05-28 11:32:10 +09:30
mei mei: me: wait for power gating exit confirmation 2015-06-13 19:48:02 -07:00
mic misc: mic: Fix reported static checker warning 2015-06-12 17:01:43 -07:00
sgi-gru
sgi-xp x86/asm/entry: Change all 'user_mode_vm()' calls to 'user_mode()' 2015-03-23 11:14:17 +01:00
ti-st ti-st: handle null allocation return correctly. 2015-05-24 12:16:47 -07:00
vmw_vmci VMCI: Guard against overflow in queue pair allocation 2015-03-25 11:32:15 +01:00
ad525x_dpot-i2c.c
ad525x_dpot-spi.c ad525x_dpot-spi: Added Blank lines after declarations 2015-01-12 05:04:12 -08:00
ad525x_dpot.c ad525x_dpot:Remove break after return 2015-01-12 05:04:12 -08:00
ad525x_dpot.h
apds990x.c
apds9802als.c
arm-charlcd.c
atmel-ssc.c
atmel_tclib.c
bh1770glc.c
bh1780gli.c misc: bh1780: Add module aliases 2015-03-16 21:10:28 +01:00
bmp085-i2c.c
bmp085-spi.c
bmp085.c
bmp085.h
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
enclosure.c enclosure: fix WARN_ON removing an adapter in multi-path devices 2015-03-31 08:53:36 +03:00
fsa9480.c
hmc6352.c
hpilo.c
hpilo.h
ics932s401.c
ioc4.c misc: ioc4: simplify wave period measurement in clock_calibrate 2015-01-12 05:04:11 -08:00
isl29003.c
isl29020.c
Kconfig misc: remove drivers for CARMA hardware 2015-05-24 12:11:55 -07:00
kgdbts.c clone: support passing tls argument via C rather than pt_regs magic 2015-06-25 17:00:38 -07:00
lattice-ecp3-config.c
lkdtm.c
Makefile misc: remove drivers for CARMA hardware 2015-05-24 12:11:55 -07:00
pch_phub.c
phantom.c
pti.c
spear13xx_pcie_gadget.c Pratyush Anand has moved 2015-06-25 17:00:38 -07:00
sram.c misc: sram: sort and clean up included headers 2015-06-12 17:03:57 -07:00
ti_dac7512.c
tifm_7xx1.c misc: tifm: match return type of wait_for_completion_timeout 2015-03-25 11:36:38 +01:00
tifm_core.c
tsl2550.c
vexpress-syscfg.c
vmw_balloon.c