]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
Fix refcnt for multicast destination
authorsean.hefty@intel.com <sean.hefty@intel.com>
Wed, 4 Apr 2012 00:20:35 +0000 (17:20 -0700)
committerSean Hefty <sean.hefty@intel.com>
Wed, 4 Apr 2012 00:20:35 +0000 (17:20 -0700)
mc_dest has a default refcnt of 0.  When a multicast destination is
released, an attempt is made to free it, which can result in the
ibacm service crashing.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
src/acm.c

index d47f9d683fa4f38ff353d8287866ff1e9ceceb39..818dbcc2ba2685f1c4cdc8f935879a9650dd1ef4 100644 (file)
--- a/src/acm.c
+++ b/src/acm.c
@@ -762,6 +762,7 @@ static void acm_process_join_resp(struct acm_ep *ep, struct ib_user_mad *umad)
                }
        }
 
+       atomic_set(&dest->refcnt, 1);
        dest->state = ACM_READY;
        acm_log(1, "join successful\n");
 out: