We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efda626 commit 0ee70dcCopy full SHA for 0ee70dc
net/vmw_vsock/af_vsock.c
@@ -2541,6 +2541,8 @@ static long vsock_dev_do_ioctl(struct file *filp,
2541
2542
switch (cmd) {
2543
case IOCTL_VM_SOCKETS_GET_LOCAL_CID:
2544
+ mutex_lock(&vsock_register_mutex);
2545
+
2546
/* To be compatible with the VMCI behavior, we prioritize the
2547
* guest CID instead of well-know host CID (VMADDR_CID_HOST).
2548
*/
@@ -2549,6 +2551,8 @@ static long vsock_dev_do_ioctl(struct file *filp,
2549
2551
else if (transport_h2g)
2550
2552
cid = transport_h2g->get_local_cid();
2553
2554
+ mutex_unlock(&vsock_register_mutex);
2555
2556
if (put_user(cid, p) != 0)
2557
retval = -EFAULT;
2558
break;
0 commit comments