1. 18 Aug, 2006 1 commit
    • Roland Dreier's avatar
      IB/mthca: No userspace SRQs if HCA doesn't have SRQ support · 5beba532
      Roland Dreier authored
      Leave all SRQ methods out of the device's uverbs_cmd_mask if the
      device doesn't have SRQ support (because of ancient firmware) so that
      we don't allow userspace to call the driver's create_srq method.  This
      fixes a userspace-triggerable oops caused by ib_uverbs_create_srq()
      following the device's ->create_srq function pointer, which will be
      NULL if the device doesn't support SRQs.
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      5beba532
  2. 16 Aug, 2006 1 commit
  3. 11 Aug, 2006 1 commit
    • Roland Dreier's avatar
      IB/mthca: Fix potential AB-BA deadlock with CQ locks · a19aa5c5
      Roland Dreier authored
      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: default avatarRoland Dreier <rolandd@cisco.com>
      a19aa5c5
  4. 10 Aug, 2006 1 commit
  5. 06 Aug, 2006 36 commits