acrn-kernel/drivers
Roland Dreier a19aa5c5fd IB/mthca: Fix potential AB-BA deadlock with CQ locks
When destroying a QP, mthca locks both the QP's send CQ and receive
CQ.  However, the following scenario is perfectly valid:

    QP_a: send_cq == CQ_x, recv_cq == CQ_y
    QP_b: send_cq == CQ_y, recv_cq == CQ_x

The old mthca code simply locked send_cq and then recv_cq, which in
this case could lead to an AB-BA deadlock if QP_a and QP_b were
destroyed simultaneously.

We can fix this by changing the locking code to lock the CQ with the
lower CQ number first, which will create a consistent lock ordering.
Also, the second CQ is locked with spin_lock_nested() to tell lockdep
that we know what we're doing with the lock nesting.

This bug was found by lockdep.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-08-11 08:56:57 -07:00
..
acorn
acpi [PATCH] memory hotadd fixes: avoid registering res twice 2006-08-06 08:57:49 -07:00
amba
atm
base [PATCH] cpu hotplug: use hotplug version of registration in late inits 2006-07-31 13:28:39 -07:00
block [PATCH] nbd: Abort request on data reception failure 2006-07-31 13:28:39 -07:00
bluetooth
cdrom
char Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input 2006-08-06 09:12:49 -07:00
clocksource
connector [PATCH] Process Events: Fix biarch compatibility issue. use __u64 timestamp 2006-07-31 13:28:36 -07:00
cpufreq [CPUFREQ] [2/2] demand load governor modules. 2006-07-31 18:37:06 -04:00
crypto
dio
dma
edac [PATCH] drivers/edac/edac_mc.h must #include <linux/platform_device.h> 2006-08-06 08:57:46 -07:00
eisa
fc4
firmware
hwmon
i2c [PATCH] SCX200_ACB: eliminate spurious timeout errors 2006-08-06 08:57:49 -07:00
ide Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-07-31 13:39:52 -07:00
ieee1394 [PATCH] ieee1394: sbp2: enable auto spin-up for Maxtor disks 2006-08-06 08:57:48 -07:00
infiniband IB/mthca: Fix potential AB-BA deadlock with CQ locks 2006-08-11 08:56:57 -07:00
input Input: atkbd - restore repeat rate when resuming 2006-08-04 22:52:46 -04:00
isdn [PATCH] eicon: fix define conflict with ptrace 2006-08-06 08:57:48 -07:00
leds
macintosh Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-07-31 13:39:52 -07:00
mca
md [PATCH] md: Fix a bug that recently crept into md/linear 2006-08-06 08:57:46 -07:00
media V4L/DVB (4380): Bttv: Revert VBI_OFFSET to previous value, it works better 2006-07-29 17:22:39 -03:00
message
mfd
misc
mmc
mtd
net [PATCH] myri10ge - Fix spurious invokations of the watchdog reset handler 2006-08-03 17:31:10 -04:00
nubus
oprofile
parisc
parport
pci PCI: Unhide the SMBus on Asus PU-DLS 2006-08-03 13:20:06 -07:00
pcmcia [PATCH] pcmcia: fix ioctl GET_CONFIGURATION_INFO for pcmcia_cards 2006-07-31 13:28:41 -07:00
pnp [PATCH] pnpacpi: reject ACPI_PRODUCER resources 2006-08-06 08:57:49 -07:00
rapidio
rtc
s390
sbus
scsi [PATCH] ahci: skip protocol test altogether in spurious interrupt code 2006-08-03 17:34:52 -04:00
serial
sh
sn
spi
tc
telephony
usb Input: ati_remote - use msec instead of jiffies 2006-08-04 22:53:37 -04:00
video [PATCH] au1100fb: Fix startup sequence 2006-08-06 08:57:47 -07:00
w1
zorro
Kconfig
Makefile