alistair23-linux/drivers/misc
Ian Munsie 0712dc7e73 cxl: Fix issues when unmapping contexts
An issue was introduced with "cxl: Unmap MMIO regions when detaching a
context" (b123429e6a) where closing a
context normally could also unmap the problem state area of other
contexts currently using the AFU.

It was also discovered that after a context's MMIO space had been
unmapped it would read 0s when accessing it, whereas the expected
behaviour was for the access to fail altogether.

In order to address these issues, this patch does two things:

- Forced mmap unmapping is only done when we are forcefully detaching
  all contexts, and not in the normal detach path. Since the normal
  context close path is tied to the file release any mmaps must have
  already been released so we don't need to worry in that case.

- The mmap path now uses a vm_operations_struct with a fault handler.
  The fault handler ensures that the context is in started state,
  otherwise it fails the access attempt with a SIGBUS.

Fixes: b123429e6a ("cxl: Unmap MMIO regions when detaching a context")
Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2015-01-12 16:40:02 +11:00
..
altera-stapl altera-stapl: replace strnicmp with strncasecmp 2014-10-14 02:18:25 +02:00
c2port
carma Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
cb710
cxl cxl: Fix issues when unmapping contexts 2015-01-12 16:40:02 +11:00
echo
eeprom Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
genwqe Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
ibmasm
lis3lv02d misc / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM 2014-12-05 02:56:02 +01:00
mei Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
mic vhost/virtio: virtio 1.0 related fixes 2014-12-18 20:50:30 -08:00
sgi-gru
sgi-xp
ti-st misc: ti-st: drop owner assignment from platform_drivers 2014-10-20 16:20:56 +02:00
vmw_vmci vmci: propagate msghdr all way down to __qp_memcpy_from_queue() 2014-12-09 16:28:23 -05:00
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c misc / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM 2014-12-05 02:56:02 +01:00
apds9802als.c
arm-charlcd.c misc: drop owner assignment from platform_drivers 2014-10-20 16:20:54 +02:00
atmel-ssc.c Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
atmel_tclib.c
bh1770glc.c misc / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM 2014-12-05 02:56:02 +01:00
bh1780gli.c
bmp085-i2c.c
bmp085-spi.c
bmp085.c
bmp085.h
cs5535-mfgpt.c misc: drop owner assignment from platform_drivers 2014-10-20 16:20:54 +02:00
ds1682.c
dummy-irq.c
enclosure.c enclosure: handle non-unique element descriptors 2014-11-12 11:15:55 +01:00
fsa9480.c
hmc6352.c
hpilo.c
hpilo.h
ics932s401.c
ioc4.c
isl29003.c
isl29020.c
Kconfig ARM: at91/Kconfig: remove unused config options 2014-11-19 11:39:23 +01:00
kgdbts.c
lattice-ecp3-config.c
lkdtm.c
Makefile
pch_phub.c pch_phub: Build context save/restore only for PM 2014-11-07 10:28:36 -08:00
phantom.c
pti.c
spear13xx_pcie_gadget.c
sram.c
ti_dac7512.c
tifm_7xx1.c
tifm_core.c
tsl2550.c
vexpress-syscfg.c ARM: vexpress: Remove non-DT code 2014-11-28 16:08:16 +01:00
vmw_balloon.c