1. 07 7月, 2017 1 次提交
    • N
      iser-target: Avoid isert_conn->cm_id dereference in isert_login_recv_done · fce50a2f
      Nicholas Bellinger 提交于
      This patch fixes a NULL pointer dereference in isert_login_recv_done()
      of isert_conn->cm_id due to isert_cma_handler() -> isert_connect_error()
      resetting isert_conn->cm_id = NULL during a failed login attempt.
      
      As per Sagi, we will always see the completion of all recv wrs posted
      on the qp (given that we assigned a ->done handler), this is a FLUSH
      error completion, we just don't get to verify that because we deref
      NULL before.
      
      The issue here, was the assumption that dereferencing the connection
      cm_id is always safe, which is not true since:
      
          commit 4a579da2
          Author: Sagi Grimberg <sagig@mellanox.com>
          Date:   Sun Mar 29 15:52:04 2015 +0300
      
               iser-target: Fix possible deadlock in RDMA_CM connection error
      
      As I see it, we have a direct reference to the isert_device from
      isert_conn which is the one-liner fix that we actually need like
      we do in isert_rdma_read_done() and isert_rdma_write_done().
      Reported-by: NAndrea Righi <righi.andrea@gmail.com>
      Tested-by: NAndrea Righi <righi.andrea@gmail.com>
      Reviewed-by: NSagi Grimberg <sagi@grimberg.me>
      Cc: <stable@vger.kernel.org> # 3.10+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      fce50a2f
  2. 31 3月, 2017 2 次提交
  3. 25 1月, 2017 1 次提交
  4. 15 12月, 2016 2 次提交
  5. 04 12月, 2016 1 次提交
  6. 24 9月, 2016 1 次提交
  7. 03 9月, 2016 1 次提交
    • R
      IB/isert: Properly release resources on DEVICE_REMOVAL · 63b268d2
      Raju Rangoju 提交于
      When the low level driver exercises the hot unplug they would call
      rdma_cm cma_remove_one which would fire DEVICE_REMOVAL event to all cma
      consumers. Now, if consumer doesn't make sure they destroy all IB
      objects created on that IB device instance prior to finalizing all
      processing of DEVICE_REMOVAL callback, rdma_cm will let the lld to
      de-register with IB core and destroy the IB device instance. And if the
      consumer calls (say) ib_dereg_mr(), it will crash since that dev object
      is NULL.
      
      In the current implementation, iser-target just initiates the cleanup
      and returns from DEVICE_REMOVAL callback. This deferred work creates a
      race between iser-target cleaning IB objects(say MR) and lld destroying
      IB device instance.
      
      This patch includes the following fixes
        -> make sure that consumer frees all IB objects associated with device
           instance
        -> return non-zero from the callback to destroy the rdma_cm id
      Signed-off-by: NRaju Rangoju <rajur@chelsio.com>
      Acked-by: NSagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      63b268d2
  8. 23 8月, 2016 1 次提交
  9. 03 8月, 2016 1 次提交
  10. 17 5月, 2016 1 次提交
    • N
      iscsi-target: Convert transport drivers to signal rdma_shutdown · bd027d85
      Nicholas Bellinger 提交于
      Instead of special casing the handful of callers that check for
      iser-target rdma verbs specific shutdown, use a simple flag at
      iscsit_transport->rdma_shutdown so each driver can signal this.
      
      Also, update iscsi-target/tcp + cxgbit to rdma_shutdown = false.
      
      Cc: Varun Prakash <varun@chelsio.com>
      Cc: Hariprasad Shenai <hariprasad@chelsio.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Sagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      bd027d85
  11. 14 5月, 2016 2 次提交
  12. 10 5月, 2016 1 次提交
  13. 31 3月, 2016 1 次提交
  14. 11 3月, 2016 11 次提交
  15. 08 1月, 2016 1 次提交
  16. 24 12月, 2015 4 次提交
  17. 23 12月, 2015 1 次提交
  18. 09 12月, 2015 1 次提交
  19. 29 10月, 2015 2 次提交
  20. 23 10月, 2015 1 次提交
  21. 08 10月, 2015 1 次提交
    • C
      IB: split struct ib_send_wr · e622f2f4
      Christoph Hellwig 提交于
      This patch split up struct ib_send_wr so that all non-trivial verbs
      use their own structure which embedds struct ib_send_wr.  This dramaticly
      shrinks the size of a WR for most common operations:
      
      sizeof(struct ib_send_wr) (old):	96
      
      sizeof(struct ib_send_wr):		48
      sizeof(struct ib_rdma_wr):		64
      sizeof(struct ib_atomic_wr):		96
      sizeof(struct ib_ud_wr):		88
      sizeof(struct ib_fast_reg_wr):		88
      sizeof(struct ib_bind_mw_wr):		96
      sizeof(struct ib_sig_handover_wr):	80
      
      And with Sagi's pending MR rework the fast registration WR will also be
      down to a reasonable size:
      
      sizeof(struct ib_fastreg_wr):		64
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> [srp, srpt]
      Reviewed-by: Chuck Lever <chuck.lever@oracle.com> [sunrpc]
      Tested-by: NHaggai Eran <haggaie@mellanox.com>
      Tested-by: NSagi Grimberg <sagig@mellanox.com>
      Tested-by: NSteve Wise <swise@opengridcomputing.com>
      e622f2f4
  22. 16 9月, 2015 2 次提交