1. 13 2月, 2014 1 次提交
    • N
      iser-target: Fix leak on failure in isert_conn_create_fastreg_pool · a80e21b3
      Nicholas Bellinger 提交于
      This patch fixes a memory leak for fr_desc upon failure of
      isert_create_fr_desc() in isert_conn_create_fastreg_pool()
      code.
      
      As reported by Coverity 1166659:
      
      *** CID 1166659:  Resource leak  (RESOURCE_LEAK)
      /drivers/infiniband/ulp/isert/ib_isert.c: 470 in isert_conn_create_fastreg_pool()
      464                      isert_conn, isert_conn->conn_fr_pool_size);
      465
      466             return 0;
      467
      468     err:
      469             isert_conn_free_fastreg_pool(isert_conn);
      >>>     CID 1166659:  Resource leak  (RESOURCE_LEAK)
      >>>     Variable "fr_desc" going out of scope leaks the storage it points to.
      470             return ret;
      471     }
      472
      473     static int
      474     isert_connect_request(struct rdma_cm_id *cma_id, struct rdma_cm_event *event)
      475     {
      
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      a80e21b3
  2. 25 1月, 2014 1 次提交
  3. 23 1月, 2014 1 次提交
    • M
      IPoIB: Report operstate consistently when brought up without a link · 437708c4
      Michal Schmidt 提交于
      After booting without a working link, "ip link" shows:
      
       5: mlx4_ib1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 2044 qdisc pfifo_fast
       state DOWN qlen 256
          ...
       7: mlx4_ib1.8003@mlx4_ib1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 2044 qdisc
       pfifo_fast state DOWN qlen 256
          ...
      
      Then after connecting and disconnecting the link, which should result
      in exactly the same state as before, it shows:
      
       5: mlx4_ib1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 2044 qdisc pfifo_fast
       state DOWN qlen 256
          ...
       7: mlx4_ib1.8003@mlx4_ib1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 2044 qdisc
       pfifo_fast state LOWERLAYERDOWN qlen 256
          ...
      
      Notice the (now correct) LOWERLAYERDOWN operstate shown for the
      mlx4_ib1.8003 interface. Ideally the identical state would be shown
      right after boot.
      
      The problem is related to the calling of netif_carrier_off() in
      network drivers.  For a long time it was known that doing
      netif_carrier_off() before registering the netdevice would result in
      the interface's operstate being shown as UNKNOWN if the device was
      brought up without a working link. This problem was fixed in commit
      8f4cccbb ('net: Set device operstate at registration time'), but
      still there remains the minor inconsistency demonstrated above.
      
      This patch fixes it by moving ipoib's call to netif_carrier_off() into
      the .ndo_open method, which is where network drivers ordinarily do it.
      With the patch when doing the same test as above, the operstate of
      mlx4_ib1.8003 is shown as LOWERLAYERDOWN right after boot.
      Signed-off-by: NMichal Schmidt <mschmidt@redhat.com>
      Acked-by: NErez Shitrit <erezsh@mellanox.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      437708c4
  4. 22 1月, 2014 1 次提交
    • B
      scsi_transport_srp: Fix a race condition · 93079162
      Bart Van Assche 提交于
      The rport timers must be stopped before the SRP initiator destroys the
      resources associated with the SCSI host. This is necessary because
      otherwise the callback functions invoked from the SRP transport layer
      could trigger a use-after-free. Stopping the rport timers before
      invoking scsi_remove_host() can trigger long delays in the SCSI error
      handler if a transport layer failure occurs while scsi_remove_host()
      is in progress. Hence move the code for stopping the rport timers from
      srp_rport_release() into a new function and invoke that function after
      scsi_remove_host() has finished. This patch fixes the following
      sporadic kernel crash:
      
           kernel BUG at include/asm-generic/dma-mapping-common.h:64!
           invalid opcode: 0000 [#1] SMP
           RIP: 0010:[<ffffffffa03b20b1>]  [<ffffffffa03b20b1>] srp_unmap_data+0x121/0x130 [ib_srp]
           Call Trace:
           [<ffffffffa03b20fc>] srp_free_req+0x3c/0x80 [ib_srp]
           [<ffffffffa03b2188>] srp_finish_req+0x48/0x70 [ib_srp]
           [<ffffffffa03b21fb>] srp_terminate_io+0x4b/0x60 [ib_srp]
           [<ffffffffa03a6fb5>] __rport_fail_io_fast+0x75/0x80 [scsi_transport_srp]
           [<ffffffffa03a7438>] rport_fast_io_fail_timedout+0x88/0xc0 [scsi_transport_srp]
           [<ffffffff8108b370>] worker_thread+0x170/0x2a0
           [<ffffffff81090876>] kthread+0x96/0xa0
           [<ffffffff8100c0ca>] child_rip+0xa/0x20
      Signed-off-by: NBart Van Assche <bvanassche@acm.org>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      93079162
  5. 19 1月, 2014 4 次提交
  6. 15 1月, 2014 1 次提交
  7. 04 1月, 2014 1 次提交
  8. 19 12月, 2013 1 次提交
  9. 12 12月, 2013 1 次提交
  10. 13 11月, 2013 2 次提交
  11. 09 11月, 2013 21 次提交
  12. 08 11月, 2013 1 次提交
  13. 07 11月, 2013 1 次提交
    • N
      ib_isert: Add support for completion interrupt coalescing · 95b60f07
      Nicholas Bellinger 提交于
      This patch adds support for completion interrupt coalescing that
      allows only every ISERT_COMP_BATCH_COUNT (8) to set IB_SEND_SIGNALED,
      thus avoiding completion interrupts for every posted iser_tx_desc.
      
      The batch processing is done using a per isert_conn llist that once
      IB_SEND_SIGNALED has been set is saved to tx_desc->comp_llnode_batch,
      and completion processing of previously posted iser_tx_descs is done
      in a single shot from within isert_send_completion() code.
      
      Note this is only done for response PDUs from ISCSI_OP_SCSI_CMD, and
      all other control type of PDU responses will force an implicit batch
      drain to occur.
      
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Kent Overstreet <kmo@daterainc.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      95b60f07
  14. 24 10月, 2013 1 次提交
  15. 14 10月, 2013 1 次提交
  16. 03 10月, 2013 1 次提交