RDMA/nes: Resource not freed for REJECTed connections
authorFaisal Latif <faisal.latif@intel.com>
Wed, 9 Dec 2009 23:54:03 +0000 (15:54 -0800)
committerRoland Dreier <rolandd@cisco.com>
Wed, 9 Dec 2009 23:54:03 +0000 (15:54 -0800)
During testing of REJECT connection error handling, we saw that the
cm_id resources are not released.  When the retransmit timer expires,
we need to send a reset message to remote node before issuing the
ABORTED event.

Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/nes/nes_cm.c

index ae0946342a9ce5523204ca9536a647445684ef25..08fcd25f788cedbc99b90208ebf47f4159d301a0 100644 (file)
@@ -513,6 +513,8 @@ static void nes_retrans_expired(struct nes_cm_node *cm_node)
                send_reset(cm_node, NULL);
                break;
        default:
+               add_ref_cm_node(cm_node);
+               send_reset(cm_node, NULL);
                create_event(cm_node, NES_CM_EVENT_ABORTED);
        }
 }