Skip to content

Commit

Permalink
prov/sockets: Properly lock eq->list
Browse files Browse the repository at this point in the history
Fix coverity missing lock

Signed-off-by: Zach Dworkin <zachary.dworkin@intel.com>
  • Loading branch information
zachdworkin authored and j-xiong committed Mar 23, 2024
1 parent d05b9e3 commit 879707e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions prov/sockets/src/sock_eq.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,9 @@ static int sock_eq_control(struct fid *fid, int command, void *arg)
case FI_WAIT_NONE:
case FI_WAIT_UNSPEC:
case FI_WAIT_FD:
ofi_mutex_lock(&eq->lock);
memcpy(arg, &eq->list.signal.fd[FI_READ_FD], sizeof(int));
ofi_mutex_unlock(&eq->lock);
break;
case FI_WAIT_SET:
case FI_WAIT_MUTEX_COND:
Expand Down

0 comments on commit 879707e

Please sign in to comment.