kernel_optimize_test/drivers/infiniband/hw/mthca
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
..
Kconfig
Makefile
mthca_allocator.c IB/mthca: Clean up mthca array index mask 2006-08-03 09:44:22 -07:00
mthca_av.c [PATCH] IB/mthca: fix static rate returned by mthca_ah_query 2006-07-14 21:53:50 -07:00
mthca_catas.c
mthca_cmd.c IB/mthca: Initialize max_cmds before debug code prints it 2006-07-24 09:36:50 -07:00
mthca_cmd.h
mthca_config_reg.h
mthca_cq.c IB/mthca: Make all device methods truly reentrant 2006-06-17 20:37:41 -07:00
mthca_dev.h
mthca_doorbell.h
mthca_eq.c [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
mthca_mad.c IB/mthca: Add client reregister event generation 2006-06-17 20:37:36 -07:00
mthca_main.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mthca_mcg.c
mthca_memfree.c
mthca_memfree.h
mthca_mr.c
mthca_pd.c
mthca_profile.c
mthca_profile.h
mthca_provider.c IB/mthca: Make all device methods truly reentrant 2006-06-17 20:37:41 -07:00
mthca_provider.h IB/mthca: Fix potential AB-BA deadlock with CQ locks 2006-08-11 08:56:57 -07:00
mthca_qp.c IB/mthca: Fix potential AB-BA deadlock with CQ locks 2006-08-11 08:56:57 -07:00
mthca_reset.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mthca_srq.c IB/mthca: Fix SRQ limit event range check 2006-07-24 07:20:32 -07:00
mthca_uar.c
mthca_user.h
mthca_wqe.h