1. 23 9月, 2006 1 次提交
  2. 11 8月, 2006 2 次提交
  3. 15 7月, 2006 1 次提交
  4. 05 7月, 2006 1 次提交
    • Z
      [PATCH] mthca: initialize send and receive queue locks separately · a46f9484
      Zach Brown 提交于
      mthca: initialize send and receive queue locks separately
      
      lockdep identifies a lock by the call site of its initialization.  By
      initializing the send and receive queue locks in mthca_wq_init() we confuse
      lockdep.  It warns that that the ordered acquiry of both locks in
      mthca_modify_qp() is recursive acquiry of one lock:
      
        =============================================
        [ INFO: possible recursive locking detected ]
        ---------------------------------------------
        modprobe/1192 is trying to acquire lock:
         (&wq->lock){....}, at: [<f892b4db>] mthca_modify_qp+0x60/0xa7b [ib_mthca]
        but task is already holding lock:
         (&wq->lock){....}, at: [<f892b4ce>] mthca_modify_qp+0x53/0xa7b [ib_mthca]
      
      Initializing the locks separately in mthca_alloc_qp_common() stops the
      warning and will let lockdep enforce proper ordering on paths that acquire
      both locks.
      Signed-off-by: NZach Brown <zach.brown@oracle.com>
      Cc: Roland Dreier <rolandd@cisco.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a46f9484
  5. 18 6月, 2006 2 次提交
    • R
      IB/mthca: Make all device methods truly reentrant · c93b6fba
      Roland Dreier 提交于
      Documentation/infiniband/core_locking.txt says:
      
        All of the methods in struct ib_device exported by a low-level
        driver must be fully reentrant.  The low-level driver is required to
        perform all synchronization necessary to maintain consistency, even
        if multiple function calls using the same object are run
        simultaneously.
      
      However, mthca's modify_qp, modify_srq and resize_cq methods are
      currently not reentrant.  Add a mutex to the QP, SRQ and CQ structures
      so that these calls can be properly serialized.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      c93b6fba
    • R
      IB/mthca: Fix memory leak on modify_qp error paths · c9c5d9fe
      Roland Dreier 提交于
      Some error paths after the mthca_alloc_mailbox() call in mthca_modify_qp()
      just do a "return -EINVAL" without freeing the mailbox.  Convert these
      returns to "goto out" to avoid leaking the mailbox storage.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      c9c5d9fe
  6. 19 5月, 2006 1 次提交
  7. 10 5月, 2006 1 次提交
    • R
      IB/mthca: Fix race in reference counting · a3285aa4
      Roland Dreier 提交于
      Fix races in in destroying various objects.  If a destroy routine
      waits for an object to become free by doing
      
      	wait_event(&obj->wait, !atomic_read(&obj->refcount));
      	/* now clean up and destroy the object */
      
      and another place drops a reference to the object by doing
      
      	if (atomic_dec_and_test(&obj->refcount))
      		wake_up(&obj->wait);
      
      then this is susceptible to a race where the wait_event() and final
      freeing of the object occur between the atomic_dec_and_test() and the
      wake_up().  And this is a use-after-free, since wake_up() will be
      called on part of the already-freed object.
      
      Fix this in mthca by replacing the atomic_t refcounts with plain old
      integers protected by a spinlock.  This makes it possible to do the
      decrement of the reference count and the wake_up() so that it appears
      as a single atomic operation to the code waiting on the wait queue.
      
      While touching this code, also simplify mthca_cq_clean(): the CQ being
      cleaned cannot go away, because it still has a QP attached to it.  So
      there's no reason to be paranoid and look up the CQ by number; it's
      perfectly safe to use the pointer that the callers already have.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      a3285aa4
  8. 11 4月, 2006 1 次提交
    • J
      IB: simplify static rate encoding · bf6a9e31
      Jack Morgenstein 提交于
      Push translation of static rate to HCA format into low-level drivers,
      where it belongs.  For static rate encoding, use encoding of rate
      field from IB standard PathRecord, with addition of value 0, for
      backwards compatibility with current usage.  The changes are:
      
       - Add enum ib_rate to midlayer includes.
       - Get rid of static rate translation in IPoIB; just use static rate
         directly from Path and MulticastGroup records.
       - Update mthca driver to translate absolute static rate into the
         format used by hardware.  This also fixes mthca's static rate
         handling for HCAs that are capable of 4X DDR.
      Signed-off-by: NJack Morgenstein <jackm@mellanox.co.il>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      bf6a9e31
  9. 30 3月, 2006 1 次提交
  10. 25 3月, 2006 4 次提交
  11. 21 3月, 2006 7 次提交
  12. 13 1月, 2006 1 次提交
  13. 07 1月, 2006 4 次提交
  14. 06 1月, 2006 1 次提交
  15. 16 12月, 2005 2 次提交
  16. 10 12月, 2005 3 次提交
  17. 30 11月, 2005 1 次提交
  18. 29 11月, 2005 1 次提交
  19. 19 11月, 2005 1 次提交
  20. 15 11月, 2005 1 次提交
  21. 11 11月, 2005 3 次提交