summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamsey Harris <ramsey@ti.com>2015-03-05 16:51:08 -0800
committerRobert Tivy <rtivy@ti.com>2015-03-05 17:33:18 -0800
commit358d966c9f5973faf9ab71fb1d7dfe5d3e08a8dc (patch)
tree0c6b89f371164b42e8df733c45954e3dfac253a6
parentce35c999f5c3368e387740a38aef3358290579b3 (diff)
downloadipc-3.35.tar.gz
SDOCM00115110 GateMP_open crashes on Keystone 23.35.01.073.35.01.06_engipc-3.35-next3.35
NameServer_get takes an array of procIds. The last element in the array must be MultiProc_INVALIDID (the array size is not known). However, several places in IPC call this function and pass an array which does not have the last entry marker. NameServer_get had a check to stop iterating when the number of processors in the cluster had been reached. I removed this check. I'm now restoring this check.
-rw-r--r--packages/ti/sdo/utils/NameServer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/ti/sdo/utils/NameServer.c b/packages/ti/sdo/utils/NameServer.c
index 97303bc..55240be 100644
--- a/packages/ti/sdo/utils/NameServer.c
+++ b/packages/ti/sdo/utils/NameServer.c
@@ -348,6 +348,7 @@ Int NameServer_get(NameServer_Handle handle, String name, Ptr value,
UInt16 baseId;
UInt16 length;
UInt16 index;
+ UInt16 cluster;
Error_init(&eb);
@@ -401,8 +402,9 @@ Int NameServer_get(NameServer_Handle handle, String name, Ptr value,
* somewhere in the list.
*/
status = NameServer_E_NOTFOUND;
+ cluster = MultiProc_getNumProcsInCluster();
- for (i = 0; procId[i] != MultiProc_INVALIDID; i++) {
+ for (i = 0; (procId[i] != MultiProc_INVALIDID) && (i < cluster); i++) {
if (procId[i] == MultiProc_self()) {
/* check local */
status = NameServer_getLocal(handle, name, value, len);