1. 27 10月, 2012 1 次提交
  2. 09 10月, 2012 1 次提交
    • J
      [SCSI] qla2xxx: fix potential deadlock on ha->hardware_lock · f24b5cb8
      Jiri Kosina 提交于
      Lockdep reports:
      
      === [ cut here ] ===
       =========================================================
       [ INFO: possible irq lock inversion dependency detected ]
       3.6.0-0.0.0.28.36b5ec9-default #1 Not tainted
       ---------------------------------------------------------
       qla2xxx_1_dpc/368 just changed the state of lock:
        (&(&ha->vport_slock)->rlock){+.....}, at: [<ffffffffa009b377>] qla2x00_configure_hba+0x197/0x3c0 [qla2xxx]
       but this lock was taken by another, HARDIRQ-safe lock in the past:
        (&(&ha->hardware_lock)->rlock){-.....}
      
      and interrupts could create inverse lock ordering between them.
      
      other info that might help us debug this:
       Possible interrupt unsafe locking scenario:
      
             CPU0                    CPU1
             ----                    ----
        lock(&(&ha->vport_slock)->rlock);
                                     local_irq_disable();
                                     lock(&(&ha->hardware_lock)->rlock);
                                     lock(&(&ha->vport_slock)->rlock);
        <Interrupt>
          lock(&(&ha->hardware_lock)->rlock);
      === [ cut here ] ===
      
      Fix the potential deadlock by disabling IRQs while holding ha->vport_slock.
      Reported-and-tested-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      Acked-by: NSaurav Kashyap <saurav.kashyap@qlogic.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      f24b5cb8
  3. 24 9月, 2012 36 次提交
  4. 23 9月, 2012 1 次提交
  5. 18 9月, 2012 1 次提交
    • R
      target: Simplify fabric sense data length handling · 9c58b7dd
      Roland Dreier 提交于
      Every fabric driver has to supply a se_tfo->set_fabric_sense_len()
      method, just so iSCSI can return an offset of 2.  However, every fabric
      driver is already allocating a sense buffer and passing it into the
      target core, either via transport_init_se_cmd() or target_submit_cmd().
      
      So instead of having iSCSI pass the start of its sense buffer into the
      core and then later tell the core to skip the first 2 bytes, it seems
      easier for iSCSI just to do the offset of 2 when it passes the sense
      buffer into the core.  Then we can drop the se_tfo->set_fabric_sense_len()
      everywhere, and just add a couple of lines of code to iSCSI to set the
      sense data length to the beginning of the buffer right before it sends
      it over the network.
      
      (nab: Remove .set_fabric_sense_len usage from tcm_qla2xxx_npiv_ops +
            change transport_get_sense_buffer to follow v3.6-rc6 code w/o
            ->set_fabric_sense_len usage)
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      9c58b7dd