]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
pick
authorSean Hefty <sean.hefty@intel.com>
Wed, 3 Dec 2014 19:37:51 +0000 (11:37 -0800)
committerSean Hefty <sean.hefty@intel.com>
Wed, 3 Dec 2014 19:37:51 +0000 (11:37 -0800)
meta
patches/ibacm-close-the-provider-endpo [new file with mode: 0644]

diff --git a/meta b/meta
index d1e520d225de22a7cd123e9084e25d957d6b5cdf..4fd863b0d6eb09fa045d0b8f15a2b072954d5d0c 100644 (file)
--- a/meta
+++ b/meta
@@ -1,8 +1,9 @@
 Version: 1
-Previous: 57fa7e0d19bdec1e72ed4f787e886c759c2ea1f4
-Head: e6f07ef8a07ba838a296cf09e02a1869246c6c2f
+Previous: f0c0965e79290ffe9fe0f78e5414e40dedfc5610
+Head: d017989d1d1412faf4c0defdcfb15bf2ea8dc88f
 Applied:
   ibacmp-missing-in-acm_log-form: e6f07ef8a07ba838a296cf09e02a1869246c6c2f
+  ibacm-close-the-provider-endpo: d017989d1d1412faf4c0defdcfb15bf2ea8dc88f
 Unapplied:
   suse: 7076e2a00570a3cda4e4ce034419399a23ebfb0a
   dev-name2ip: 8e00708e882239292492e13aa51c82042255933c
diff --git a/patches/ibacm-close-the-provider-endpo b/patches/ibacm-close-the-provider-endpo
new file mode 100644 (file)
index 0000000..1bf240d
--- /dev/null
@@ -0,0 +1,38 @@
+Bottom: 32c7ec2c8367514c25b792828db6878eba12b5c5
+Top:    fab6eb4037e9f3c9e7e0ad14459441cbe31782cf
+Author: Kaike Wan <kaike.wan@intel.com>
+Date:   2014-12-03 11:37:51 -0800
+
+ibacm: close the provider endpoint when it fails to assign a name to a core endpoint
+
+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 <kaike.wan@intel.com>
+
+
+---
+
+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);
+ }