1. 08 Apr, 2009 3 commits
    • Faisal Latif's avatar
      RDMA/nes: Fix nes_nic_cm_xmit() error handling · 5962c2c8
      Faisal Latif authored
      We are getting crash or hung situation when we are running network
      cable pull tests during RDMA traffic.
      
      In schedule_nes_timer(), we return an error if nes_nic_cm_xmit()
      returns failure.  This is changed to success as skb is being put on
      the timer routines to be processed later.  In send_syn() case, we are
      indicating connect failure once from nes_connect() and the other when
      the rexmit retries expires.
      
      The other issue is skb->users which we are incrementing before calling
      nes_nic_cm_xmit() which calls dev_queue_xmit() but in case of failure
      we are decrementing the skb->users at the same time putting the skb on
      the rexmit path.  Even if dev_queue_xmit() fails, the skb->users is
      decremented already.  We are removing the decrement of skb->users in
      case of failure from both schedule_nes_timer() as well as from
      nes_cm_timer_tick().
      
      There is also extra check in nes_cm_timer_tick() for rexmit failure
      which does a break from the loop is removed.  This causes problem as
      the other nodes have their cm_node->ref_count incremented and are not
      processed.
      Signed-off-by: default avatarFaisal Latif <faisal.latif@intel.com>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      5962c2c8
    • Faisal Latif's avatar
      RDMA/nes: Fix error handling issues · 79fc3d74
      Faisal Latif authored
      Fix issues found by static code analysis:
      
      (1) Check if cm_node was successfully created for loopback connection.
      
      (2) schedule_nes_timer() does not free up allocated memory after
          encountering an error.  There is a WARN_ON() for this condition.
      
      (3) there is a cm_node->freed flag which is set but not used.
      Reported-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarFaisal Latif <faisal.latif@intel.com>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      79fc3d74
    • Don Wood's avatar
      RDMA/nes: Fix incorrect casts on 32-bit architectures · 7a5efb62
      Don Wood authored
      The were some incorrect casts to unsigned long that caused 64-bit values
      to be truncated on 32-bit architectures and made the driver pass invalid
      adresses and lengths to the hardware.  The problems were primarily seen
      with kernels with highmem configured but some could show up in
      non-highmem kernels, too.
      Signed-off-by: default avatarDon Wood <donald.e.wood@intel.com>
      Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
      7a5efb62
  2. 28 Mar, 2009 37 commits