Revision 2c069a118fe1d80c47dca84e1561045fc7f3cc9e authored by Daniel Axtens on 09 July 2015, 23:04:25 UTC, committed by Michael Ellerman on 10 July 2015, 01:44:25 UTC
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>
1 parent 9958084
File | Mode | Size |
---|---|---|
partitions | ||
Kconfig | -rw-r--r-- | 3.7 KB |
Kconfig.iosched | -rw-r--r-- | 1.6 KB |
Makefile | -rw-r--r-- | 923 bytes |
bio-integrity.c | -rw-r--r-- | 14.0 KB |
bio.c | -rw-r--r-- | 50.2 KB |
blk-cgroup.c | -rw-r--r-- | 31.5 KB |
blk-core.c | -rw-r--r-- | 90.7 KB |
blk-exec.c | -rw-r--r-- | 3.2 KB |
blk-flush.c | -rw-r--r-- | 14.8 KB |
blk-integrity.c | -rw-r--r-- | 12.5 KB |
blk-ioc.c | -rw-r--r-- | 10.2 KB |
blk-iopoll.c | -rw-r--r-- | 5.8 KB |
blk-lib.c | -rw-r--r-- | 8.0 KB |
blk-map.c | -rw-r--r-- | 5.2 KB |
blk-merge.c | -rw-r--r-- | 14.6 KB |
blk-mq-cpu.c | -rw-r--r-- | 1.6 KB |
blk-mq-cpumap.c | -rw-r--r-- | 2.5 KB |
blk-mq-sysfs.c | -rw-r--r-- | 10.6 KB |
blk-mq-tag.c | -rw-r--r-- | 16.4 KB |
blk-mq-tag.h | -rw-r--r-- | 2.2 KB |
blk-mq.c | -rw-r--r-- | 53.6 KB |
blk-mq.h | -rw-r--r-- | 3.3 KB |
blk-settings.c | -rw-r--r-- | 27.2 KB |
blk-softirq.c | -rw-r--r-- | 4.4 KB |
blk-sysfs.c | -rw-r--r-- | 15.5 KB |
blk-tag.c | -rw-r--r-- | 10.0 KB |
blk-throttle.c | -rw-r--r-- | 45.8 KB |
blk-timeout.c | -rw-r--r-- | 5.7 KB |
blk.h | -rw-r--r-- | 8.6 KB |
bounce.c | -rw-r--r-- | 6.4 KB |
bsg-lib.c | -rw-r--r-- | 6.0 KB |
bsg.c | -rw-r--r-- | 22.9 KB |
cfq-iosched.c | -rw-r--r-- | 122.1 KB |
cmdline-parser.c | -rw-r--r-- | 4.9 KB |
compat_ioctl.c | -rw-r--r-- | 20.8 KB |
deadline-iosched.c | -rw-r--r-- | 11.3 KB |
elevator.c | -rw-r--r-- | 23.8 KB |
genhd.c | -rw-r--r-- | 44.3 KB |
ioctl.c | -rw-r--r-- | 11.5 KB |
ioprio.c | -rw-r--r-- | 5.0 KB |
noop-iosched.c | -rw-r--r-- | 2.7 KB |
partition-generic.c | -rw-r--r-- | 14.0 KB |
scsi_ioctl.c | -rw-r--r-- | 19.4 KB |
t10-pi.c | -rw-r--r-- | 5.1 KB |
Computing file changes ...