|
|
6698ac |
commit f3a969b4542204c9b09d5c2d229c7b55aaa0995e
|
|
|
6698ac |
Author: Michael J. Ruhl <michael.j.ruhl@intel.com>
|
|
|
6698ac |
Date: Mon Oct 16 10:24:40 2017 -0400
|
|
|
6698ac |
|
|
|
6698ac |
ibacm: Incorrect list used for subnet list causes a segfault
|
|
|
6698ac |
|
|
|
6698ac |
Setting the provider keyword in the ibacm_opts.cfg file to something
|
|
|
6698ac |
other than 'default' will cause ibacm to segfault on startup:
|
|
|
6698ac |
|
|
|
6698ac |
ibacm[32739]: segfault at 302e40 ip 000000000040432d
|
|
|
6698ac |
sp 00007ffe4039e1c0 error 4 in ibacm[400000+c000]
|
|
|
6698ac |
|
|
|
6698ac |
To re-produce the segfault, change the provider keyword in
|
|
|
6698ac |
ibacm_opts.cfg from:
|
|
|
6698ac |
|
|
|
6698ac |
provider ibacmp default
|
|
|
6698ac |
|
|
|
6698ac |
to:
|
|
|
6698ac |
|
|
|
6698ac |
provider ibacmp 0xFE80000000000000
|
|
|
6698ac |
|
|
|
6698ac |
When adding subnets to a provider subnet list, the incorrect list is
|
|
|
6698ac |
used. The list used is the provider_list (list of all providers)
|
|
|
6698ac |
rather than the (specific) provider subnet list.
|
|
|
6698ac |
|
|
|
6698ac |
This corrupts the provider_list, and causes ibacm to crash with the
|
|
|
6698ac |
above segfault.
|
|
|
6698ac |
|
|
|
6698ac |
Use the correct list when adding subnet information to a provider.
|
|
|
6698ac |
|
|
|
6698ac |
Fixes: 26e05f8304a506 ("ibacm: use ccan/list.h")
|
|
|
6698ac |
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
|
|
|
6698ac |
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
|
|
|
6698ac |
Tested-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
|
|
|
6698ac |
Signed-off-by: Doug Ledford <dledford@redhat.com>
|
|
|
6698ac |
|
|
|
6698ac |
diff --git a/ibacm/src/acm.c b/ibacm/src/acm.c
|
|
|
6698ac |
index 1ccef948..a67001d4 100644
|
|
|
6698ac |
--- a/ibacm/src/acm.c
|
|
|
6698ac |
+++ b/ibacm/src/acm.c
|
|
|
6698ac |
@@ -2587,8 +2587,8 @@ static void acm_load_prov_config(void)
|
|
|
6698ac |
return;
|
|
|
6698ac |
}
|
|
|
6698ac |
subnet->subnet_prefix = htobe64(prefix);
|
|
|
6698ac |
- list_add_after(&provider_list, &prov->entry,
|
|
|
6698ac |
- &subnet->entry);
|
|
|
6698ac |
+ list_add_tail(&prov->subnet_list,
|
|
|
6698ac |
+ &subnet->entry);
|
|
|
6698ac |
}
|
|
|
6698ac |
}
|
|
|
6698ac |
}
|