瀏覽代碼

lookup_and_alloc_client(): race condition

There is unnecessary unlock/lock causing a race. remove it.

Signed-off-by: Isaku Yamahata <isaku.yamahata@gmail.com>
Isaku Yamahata 5 年之前
父節點
當前提交
b49b3898a5
共有 1 個文件被更改,包括 0 次插入2 次删除
  1. 0 2
      LibOS/shim/src/ipc/shim_ipc.c

+ 0 - 2
LibOS/shim/src/ipc/shim_ipc.c

@@ -203,9 +203,7 @@ lookup_and_alloc_client (IDTYPE vmid, const char * uri)
             unlock(ipc_info_lock);
             return p;
         }
-    unlock(ipc_info_lock);
 
-    lock(ipc_info_lock);
     p = __get_new_ipc_info(vmid, uri, len);
     if (p) {
         listp_add(p, head, hlist);