Message ID | 1404341182-12533-1-git-send-email-sean.hefty@intel.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
On 7/2/2014 6:46 PM, sean.hefty@intel.com wrote: <snip...> > rclose will call shutdown only if we're connected. However, if the > keepalive failed, the socket will be in an error state. So, > no call to rshutdown, which will leave the freed rsocket on > the keepalive thread's list. > > The fix is to to have rclose remove an rsocket from being processed > by a service thread if it is still active. > > Signed-off-by: Sean Hefty <sean.hefty@intel.com> Tested-by: Hal Rosenstock <hal@mellanox.com> Thanks! -- Hal -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/src/rsocket.c b/src/rsocket.c index 3048e5e..f81fb1b 100644 --- a/src/rsocket.c +++ b/src/rsocket.c @@ -3265,6 +3265,8 @@ int rclose(int socket) if (rs->type == SOCK_STREAM) { if (rs->state & rs_connected) rshutdown(socket, SHUT_RDWR); + else if (rs->opts & RS_OPT_SVC_ACTIVE) + rs_notify_svc(&tcp_svc, rs, RS_SVC_REM_KEEPALIVE); } else { ds_shutdown(rs); }