SDOCM00112918 fix: release NameServerRemoteRpmsg gate on timeout
authorRobert Tivy <rtivy@ti.com>
Tue, 9 Sep 2014 22:43:54 +0000 (15:43 -0700)
committerRobert Tivy <rtivy@ti.com>
Wed, 10 Sep 2014 21:03:18 +0000 (14:03 -0700)
The NameServerRemoteRpmsg_get() function has a timeout-based Semaphore_pend
that can return failure when the timeout expires.  The function returns
without releasing the gate when the timeout failure happens.  This causes
any other thread to block when calling MessageQ_open(), while subsequent
MessageQ_open() calls on the same thread can succeed.

packages/ti/ipc/namesrv/NameServerRemoteRpmsg.c

index f86734924676aabdd90dc6833478713266bd3fab..35e2b7376899025370755bd065addda5b9d12ed3 100644 (file)
@@ -207,7 +207,8 @@ Int NameServerRemoteRpmsg_get(NameServerRemoteRpmsg_Object *obj,
         if (status == FALSE) {
             Log_print0(Diags_INFO, FXNN": Wait for NS reply timed out\n");
             /* return timeout failure */
-            return (NameServer_E_TIMEOUT);
+            status = NameServer_E_TIMEOUT;
+            goto exit;
         }
 
         /* get the message */