linux_dsm_epyc7002/drivers
Jack Morgenstein a040f95dc8 IB/core: Fix XRC race condition in ib_uverbs_open_qp
In ib_uverbs_open_qp, the sharable xrc target qp is created as a
"pseudo" qp and added to a list of qp's sharing the same physical
QP.  This is done before the "pseudo" qp is assigned a uobject.

There is a race condition here if an async event arrives at the
physical qp.  If the event is handled after the pseudo qp is added to
the list, but before it is assigned a uobject, the kernel crashes in
ib_uverbs_qp_event_handler, due to trying to dereference a NULL
uobject pointer.

Note that simply checking for non-NULL is not enough, due to error
flows in ib_uverbs_open_qp.  If the failure is after assigning the
uobject, but before the qp has fully been created, we still have a
problem.

Thus, in ib_uverbs_qp_event_handler, we test that the uobject is
present, and also that it is live.

Reported-by: Matthew Finlay <matt@mellanox.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2014-10-14 00:30:56 -07:00
..
accessibility
acpi Merge branches 'acpi-hotplug', 'acpi-scan', 'acpi-lpss', 'acpi-gpio' and 'acpi-video' 2014-09-25 22:59:30 +02:00
amba
ata
atm
auxdisplay
base regmap: Fix registers file debugfs 2014-09-15 16:20:56 -07:00
bcma
block Merge branch 'for-linus' of git://git.kernel.dk/linux-block 2014-09-13 09:39:55 -07:00
bluetooth
bus
cdrom
char
clk
clocksource
connector
cpufreq cpufreq: release policy->rwsem on error 2014-09-22 14:32:43 +02:00
cpuidle
crypto crypto: ccp - Check for CCP before registering crypto algs 2014-09-24 14:23:34 +08:00
dca
devfreq
dio
dma dmaengine: omap-dma: Restore the CLINK_CTRL in resume path 2014-09-23 18:22:55 +05:30
dma-buf
edac
eisa
extcon
firewire
firmware Revert "efi/x86: efistub: Move shared dependencies to <asm/efi.h>" 2014-09-23 22:01:55 +01:00
fmc
gpio ACPI and power management fixes for 3.17-rc7 2014-09-25 15:25:52 -07:00
gpu Merge branch 'drm-fixes-3.17' of git://people.freedesktop.org/~agd5f/linux into drm-fixes 2014-09-25 06:49:26 +10:00
hid
hsi
hv
hwmon hwmon: (tmp103) Fix resource leak bug in tmp103 temperature sensor driver 2014-09-22 11:11:48 -07:00
hwspinlock
i2c i2c: acpi: Fix NULL Pointer dereference 2014-09-25 16:08:15 +02:00
ide
idle
iio iio:magnetometer: bugfix magnetometers gain values 2014-09-14 18:21:23 +01:00
infiniband IB/core: Fix XRC race condition in ib_uverbs_open_qp 2014-10-14 00:30:56 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-09-26 11:04:31 -07:00
iommu
ipack
irqchip
isdn
leds
lguest
macintosh
mailbox
mcb
md Bugfixes for md/raid1 2014-09-24 08:53:33 -07:00
media [media] em28xx-v4l: get rid of field "users" in struct em28xx_v4l2" 2014-09-21 21:27:57 -03:00
memory
memstick
message scsi: use 'depends' instead of 'select' for SCSI_FC_ATTRS 2014-09-16 16:55:55 -04:00
mfd
misc
mmc
mtd
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-09-24 12:45:24 -07:00
nfc
ntb ntb: Add alignment check to meet hardware requirement 2014-09-14 00:10:38 -04:00
nubus
of of/fdt: fix memory range check 2014-09-25 11:55:50 +01:00
oprofile
parisc parisc: pdc_stable.c: Avoid potential stack overflows 2014-09-21 22:31:08 +02:00
parport
pci PCI updates for v3.17: 2014-09-24 09:46:29 -07:00
pcmcia
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc drivers/rtc/rtc-efi.c: add missing module alias 2014-09-26 08:10:35 -07:00
s390
sbus
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-09-22 18:23:33 -07:00
sfi
sh
sn
soc drivers/soc: qcom: do not disable the iface clock in probe 2014-09-23 21:38:32 -07:00
spi Merge remote-tracking branches 'spi/fix/davinci', 'spi/fix/dw', 'spi/fix/fsl', 'spi/fix/pl022', 'spi/fix/rockchip' and 'spi/fix/sirf' into spi-linus 2014-09-16 16:20:19 -07:00
spmi
ssb
staging staging: vt6655: buffer overflow in ioctl 2014-09-19 15:32:20 -07:00
target iscsi-target: avoid NULL pointer in iscsi_copy_param_list failure 2014-09-17 13:44:01 -07:00
tc
thermal
thunderbolt
tty
uio
usb USB: storage: Add quirks for Entrega/Xircom USB to SCSI converters 2014-09-19 15:01:38 -07:00
uwb
vfio
vhost
video
virt
virtio
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile