linux/drivers/infiniband/hw
Roland Dreier 8b8c8bca3a IB/ipath: Fix potential deadlock with multicast spinlocks
Lockdep found the following potential deadlock between mcast_lock and
n_mcast_grps_lock: mcast_lock is taken from both interrupt context and
process context, so spin_lock_irqsave() must be used to take it.
n_mcast_grps_lock is only taken from process context, so at first it
seems safe to take it with plain spin_lock(); however, it also nests
inside mcast_lock, and hence we could deadlock:

  cpu A                                   cpu B
    ipath_mcast_add():
      spin_lock_irq(&mcast_lock);

                                            ipath_mcast_detach():
                                              spin_lock(&n_mcast_grps_lock);

                                            <enter interrupt>

                                            ipath_mcast_find():
                                              spin_lock_irqsave(&mcast_lock);

      spin_lock(&n_mcast_grps_lock);

Fix this by using spin_lock_irq() to take n_mcast_grps_lock.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-19 08:51:53 -07:00
..
amso1100 IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules 2007-05-08 18:00:37 -07:00
cxgb3 IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules 2007-05-08 18:00:37 -07:00
ehca IB/ehca: Disable scaling code by default, bump version number 2007-05-14 13:41:40 -07:00
ipath IB/ipath: Fix potential deadlock with multicast spinlocks 2007-05-19 08:51:53 -07:00
mlx4 IB/mlx4: Fix uninitialized spinlock for 32-bit archs 2007-05-14 13:02:58 -07:00
mthca IB/mthca: Set cleaned CQEs back to HW ownership when cleaning CQ 2007-05-14 14:10:34 -07:00