1. 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
  2. 19 5月, 2006 1 次提交
  3. 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
  4. 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
  5. 30 3月, 2006 1 次提交
  6. 25 3月, 2006 4 次提交
  7. 21 3月, 2006 7 次提交
  8. 13 1月, 2006 1 次提交
  9. 07 1月, 2006 4 次提交
  10. 06 1月, 2006 1 次提交
  11. 16 12月, 2005 2 次提交
  12. 10 12月, 2005 3 次提交
  13. 30 11月, 2005 1 次提交
  14. 29 11月, 2005 1 次提交
  15. 19 11月, 2005 1 次提交
  16. 15 11月, 2005 1 次提交
  17. 11 11月, 2005 3 次提交
  18. 04 11月, 2005 1 次提交
  19. 31 10月, 2005 1 次提交
    • T
      [PATCH] fix missing includes · 4e57b681
      Tim Schmielau 提交于
      I recently picked up my older work to remove unnecessary #includes of
      sched.h, starting from a patch by Dave Jones to not include sched.h
      from module.h. This reduces the number of indirect includes of sched.h
      by ~300. Another ~400 pointless direct includes can be removed after
      this disentangling (patch to follow later).
      However, quite a few indirect includes need to be fixed up for this.
      
      In order to feed the patches through -mm with as little disturbance as
      possible, I've split out the fixes I accumulated up to now (complete for
      i386 and x86_64, more archs to follow later) and post them before the real
      patch.  This way this large part of the patch is kept simple with only
      adding #includes, and all hunks are independent of each other.  So if any
      hunk rejects or gets in the way of other patches, just drop it.  My scripts
      will pick it up again in the next round.
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4e57b681
  20. 26 10月, 2005 1 次提交
  21. 18 10月, 2005 1 次提交
  22. 21 9月, 2005 1 次提交