1. 11 5月, 2006 6 次提交
  2. 10 5月, 2006 5 次提交
    • M
      [SCSI] mptfc: race between mptfc_register_dev and mptfc_target_alloc · 6dd727da
      mdr@sgi.com 提交于
      A race condition exists in mptfc between the thread registering a device
      with the fc transport and the scan work generated by the transport.
      This race existed prior to the application of the mptfc bug fix patch.
      
      mptfc_register_dev() calls fc_remote_port_add() with the FC_RPORT_ROLE_TARGET
      bit set in the rport ids passed to the function.  Having this bit set causes
      fc_remote_port_add() to schedule a scan of the device.
      
      This scan can execute before mptfc_register_dev() can fill in the dd_data
      in the rport structure.  When this happens, mptfc_target_alloc() will fail
      because dd_data is null.
      
      Attached is a patch which fixes the problem.  The patch changes the rport ids
      passed to fc_remote_port_add() to not have the TARGET bit set.  This prevents
      the scan from being scheduled.  After mptfc_register_dev() fills in the rport
      dd_data field, fc_remote_port_rolechg() is called, changing the role of the
      rport to TARGET.  Thus, the scan is scheduled after dd_data is filled
      in which prevents the failure in mptfc_target_alloc().
      Signed-off-by: NMichael Reed <mdr@sgi.com>
      Signed-off-by: NEric Moore <Eric.Moore@lsil.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      6dd727da
    • R
      IPoIB: Free child interfaces properly · 5941d079
      Roland Dreier 提交于
      When deleting a child interface with a non-default P_Key via
      /sys/class/net/ibX/delete_child, the interface must be freed with
      free_netdev() (rather than kfree() on the private data).
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      5941d079
    • 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
    • R
      IB/srp: Fix tracking of pending requests during error handling · d945e1df
      Roland Dreier 提交于
      If a SCSI abort completes, or the command completes successfully, then
      the driver must remove the command from its queue of pending
      commands.  Similarly, if a device reset succeeds, then all commands
      queued for the given device must be removed from the queue.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      d945e1df
    • R
      IB: Fix display of 4-bit port counters in sysfs · d8b9f23b
      Ralph Campbell 提交于
      The code to display local_link_integrity_errors and
      excessive_buffer_overrun_errors in
      /sys/class/infiniband/<hca>/ports/<n>/counters/
      uses the wrong shift to extract the 4 bit values.
      Signed-off-by: NRalph Campbell <ralph.campbell@qlogic.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      d8b9f23b
  3. 09 5月, 2006 14 次提交
  4. 07 5月, 2006 2 次提交
  5. 06 5月, 2006 5 次提交
  6. 05 5月, 2006 1 次提交
  7. 04 5月, 2006 7 次提交