From: Kaike Wan <[email protected]> In function acm_ep_up(), when it fails to assign any name to an endpoint, the endpoint in the provider is not properly closed before the core endpoint is freed. This may cause segfault when ibacmp tries to join multicast group with a stale core endpoint pointer.
Signed-off-by: Kaike Wan <[email protected]> --- src/acm.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/acm.c b/src/acm.c index 11fda4c..d807c73 100644 --- a/src/acm.c +++ b/src/acm.c @@ -1744,12 +1744,15 @@ static void acm_ep_up(struct acmc_port *port, uint16_t pkey) ret = acm_assign_ep_names(ep); if (ret) { acm_log(0, "ERROR - unable to assign EP name for pkey 0x%x\n", pkey); - goto err; + goto ep_close; } DListInsertHead(&ep->entry, &port->ep_list); return; +ep_close: + port->prov->close_endpoint(ep->prov_ep_context); + err: free(ep); } -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
