1. 09 11月, 2013 4 次提交
  2. 24 10月, 2013 1 次提交
  3. 03 10月, 2013 1 次提交
  4. 02 10月, 2013 1 次提交
    • N
      ib_srpt: Destroy cm_id before destroying QP. · 0b41d6ca
      Nicholas Bellinger 提交于
      This patch fixes a bug where ib_destroy_cm_id() was incorrectly being called
      after srpt_destroy_ch_ib() had destroyed the active QP.
      
      This would result in the following failed SRP_LOGIN_REQ messages:
      
      Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff1762bd, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 1 (guid=0xfe80000000000000:0x2c903009f8f41)
      Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff1758f9, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 2 (guid=0xfe80000000000000:0x2c903009f8f42)
      Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff175941, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 2 (guid=0xfe80000000000000:0x2c90300a3cfb2)
      Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff176299, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 1 (guid=0xfe80000000000000:0x2c90300a3cfb1)
      mlx4_core 0000:84:00.0: command 0x19 failed: fw status = 0x9
      rejected SRP_LOGIN_REQ because creating a new RDMA channel failed.
      Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff176299, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 1 (guid=0xfe80000000000000:0x2c90300a3cfb1)
      mlx4_core 0000:84:00.0: command 0x19 failed: fw status = 0x9
      rejected SRP_LOGIN_REQ because creating a new RDMA channel failed.
      Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff176299, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 1 (guid=0xfe80000000000000:0x2c90300a3cfb1)
      Reported-by: NNavin Ahuja <navin.ahuja@saratoga-speed.com>
      Cc: stable@vger.kernel.org # 3.3+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      0b41d6ca
  5. 11 9月, 2013 4 次提交
  6. 10 9月, 2013 2 次提交
    • N
      iscsi/iser-target: Convert to command priv_size usage · d703ce2f
      Nicholas Bellinger 提交于
      This command converts iscsi/isert-target to use allocations based on
      iscsit_transport->priv_size within iscsit_allocate_cmd(), instead of
      using an embedded isert_cmd->iscsi_cmd.
      
      This includes removing iscsit_transport->alloc_cmd() usage, along
      with updating isert-target code to use iscsit_priv_cmd().
      
      Also, remove left-over iscsit_transport->release_cmd() usage for
      direct calls to iscsit_release_cmd(), and drop the now unused
      lio_cmd_cache and isert_cmd_cache.
      
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Kent Overstreet <kmo@daterainc.com>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      d703ce2f
    • N
      iser-target: Updates for login negotiation multi-plexing support · 6faaa85f
      Nicholas Bellinger 提交于
      This patch updates iser-target code to support login negotiation
      multi-plexing.  This includes only using isert_conn->conn_login_comp
      for the first login request PDU, pushing the subsequent processing
      to iscsi_conn->login_work -> iscsi_target_do_login_rx(), and turning
      isert_get_login_rx() into a NOP.
      
      v3 changes:
         - Drop unnecessary LOGIN_FLAGS_READ_ACTIVE bit set in
           isert_rx_login_req()
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      6faaa85f
  7. 03 9月, 2013 2 次提交
  8. 26 8月, 2013 1 次提交
  9. 14 8月, 2013 1 次提交
    • J
      IPoIB: Fix race in deleting ipoib_neigh entries · 49b8e744
      Jim Foraker 提交于
      In several places, this snippet is used when removing neigh entries:
      
      	list_del(&neigh->list);
      	ipoib_neigh_free(neigh);
      
      The list_del() removes neigh from the associated struct ipoib_path, while
      ipoib_neigh_free() removes neigh from the device's neigh entry lookup
      table.  Both of these operations are protected by the priv->lock
      spinlock.  The table however is also protected via RCU, and so naturally
      the lock is not held when doing reads.
      
      This leads to a race condition, in which a thread may successfully look
      up a neigh entry that has already been deleted from neigh->list.  Since
      the previous deletion will have marked the entry with poison, a second
      list_del() on the object will cause a panic:
      
        #5 [ffff8802338c3c70] general_protection at ffffffff815108c5
           [exception RIP: list_del+16]
           RIP: ffffffff81289020  RSP: ffff8802338c3d20  RFLAGS: 00010082
           RAX: dead000000200200  RBX: ffff880433e60c88  RCX: 0000000000009e6c
           RDX: 0000000000000246  RSI: ffff8806012ca298  RDI: ffff880433e60c88
           RBP: ffff8802338c3d30   R8: ffff8806012ca2e8   R9: 00000000ffffffff
           R10: 0000000000000001  R11: 0000000000000000  R12: ffff8804346b2020
           R13: ffff88032a3e7540  R14: ffff8804346b26e0  R15: 0000000000000246
           ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0000
        #6 [ffff8802338c3d38] ipoib_cm_tx_handler at ffffffffa066fe0a [ib_ipoib]
        #7 [ffff8802338c3d98] cm_process_work at ffffffffa05149a7 [ib_cm]
        #8 [ffff8802338c3de8] cm_work_handler at ffffffffa05161aa [ib_cm]
        #9 [ffff8802338c3e38] worker_thread at ffffffff81090e10
       #10 [ffff8802338c3ee8] kthread at ffffffff81096c66
       #11 [ffff8802338c3f48] kernel_thread at ffffffff8100c0ca
      
      We move the list_del() into ipoib_neigh_free(), so that deletion happens
      only once, after the entry has been successfully removed from the lookup
      table.  This same behavior is already used in ipoib_del_neighs_by_gid()
      and __ipoib_reap_neigh().
      Signed-off-by: NJim Foraker <foraker1@llnl.gov>
      Reviewed-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Reviewed-by: NJack Wang <jinpu.wang@profitbricks.com>
      Reviewed-by: NShlomo Pongratz <shlomop@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      49b8e744
  10. 10 8月, 2013 7 次提交
  11. 01 8月, 2013 2 次提交
    • E
      IPoIB: Fix pkey change flow for virtualization environments · c2904141
      Erez Shitrit 提交于
      IPoIB's required behaviour w.r.t to the pkey used by the device is the following:
      
      - For "parent" interfaces (e.g ib0, ib1, etc) who are created
        automatically as a result of hot-plug events from the IB core, the
        driver needs to take whatever pkey vlaue it finds in index 0, and
        stick to that index.
      
      - For child interfaces (e.g ib0.8001, etc) created by admin directive,
        the driver needs to use and stick to the value provided during its
        creation.
      
      In SR-IOV environment its possible for the VF probe to take place
      before the cloud management software provisions the suitable pkey for
      the VF in the paravirtualed PKEY table index 0. When this is the case,
      the VF IB stack will find in index 0 an invalide pkey, which is all
      zeros.
      
      Moreover, the cloud managment can assign the pkey value at index 0 at
      any time of the guest life cycle.
      
      The correct behavior for IPoIB to address these requirements for
      parent interfaces is to use PKEY_CHANGE event as trigger to optionally
      re-init the device pkey value and re-create all the relevant resources
      accordingly, if the value of the pkey in index 0 has changed (from
      invalid to valid or from valid value X to invalid value Y).
      
      This patch enhances the heavy flushing code which is triggered by pkey
      change event, to behave correctly for parent devices. For child
      devices, the code remains the same, namely chases pkey value and not
      index.
      Signed-off-by: NErez Shitrit <erezsh@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      c2904141
    • O
      IPoIB: Make sure child devices use valid/proper pkeys · 3d790a4c
      Or Gerlitz 提交于
      Make sure that the IB invalid pkey (0x0000 or 0x8000) isn't used for
      child devices.
      
      Also, make sure to always set the full membership bit for the pkey of
      devices created by rtnl link ops.
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      3d790a4c
  12. 12 7月, 2013 1 次提交
  13. 08 7月, 2013 6 次提交
  14. 07 7月, 2013 4 次提交
    • N
      iscsi-target: Fix ISCSI_OP_SCSI_TMFUNC handling for iser · 186a9647
      Nicholas Bellinger 提交于
      This patch adds target_get_sess_cmd reference counting for
      iscsit_handle_task_mgt_cmd(), and adds a target_put_sess_cmd()
      for the failure case.
      
      It also fixes a bug where ISCSI_OP_SCSI_TMFUNC type commands
      where leaking iscsi_cmd->i_conn_node and eventually triggering
      an OOPs during struct isert_conn shutdown.
      
      Cc: stable@vger.kernel.org  # 3.10+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      186a9647
    • N
      iscsi-target: Fix iscsit_sequence_cmd reject handling for iser · 561bf158
      Nicholas Bellinger 提交于
      This patch moves ISCSI_OP_REJECT failures into iscsit_sequence_cmd()
      in order to avoid external iscsit_reject_cmd() reject usage for all
      PDU types.
      
      It also updates PDU specific handlers for traditional iscsi-target
      code to not reset the session after posting a ISCSI_OP_REJECT during
      setup.
      
      (v2: Fix CMDSN_LOWER_THAN_EXP for ISCSI_OP_SCSI to call
           target_put_sess_cmd() after iscsit_sequence_cmd() failure)
      
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: stable@vger.kernel.org  # 3.10+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      561bf158
    • N
      iscsi-target: Fix iscsit_add_reject* usage for iser · ba159914
      Nicholas Bellinger 提交于
      This patch changes iscsit_add_reject() + iscsit_add_reject_from_cmd()
      usage to not sleep on iscsi_cmd->reject_comp to address a free-after-use
      usage bug in v3.10 with iser-target code.
      
      It saves ->reject_reason for use within iscsit_build_reject() so the
      correct value for both transport cases.  It also drops the legacy
      fail_conn parameter usage throughput iscsi-target code and adds
      two iscsit_add_reject_cmd() and iscsit_reject_cmd helper functions,
      along with various small cleanups.
      
      (v2: Re-enable target_put_sess_cmd() to be called from
           iscsit_add_reject_from_cmd() for rejects invoked after
           target_get_sess_cmd() has been called)
      
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: stable@vger.kernel.org  # 3.10+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      ba159914
    • N
      iser-target: Fix isert_put_reject payload buffer post · 3df8f68a
      Nicholas Bellinger 提交于
      This patch adds the missing isert_put_reject() logic to post
      a outgoing payload buffer to hold the 48 bytes of original PDU
      header request payload for the rejected cmd.
      
      It also fixes ISTATE_SEND_REJECT handling in isert_response_completion()
      -> isert_do_control_comp() code, and drops incorrect iscsi_cmd_t->reject_comp
      usage.
      
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Mike Christie <michaelc@cs.wisc.edu>
      Cc: stable@vger.kernel.org  # 3.10+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      3df8f68a
  15. 02 7月, 2013 3 次提交