summaryrefslogtreecommitdiffstats
path: root/net/vmw_vsock/vsock_addr.c
diff options
context:
space:
mode:
authorSunil Muthuswamy2019-06-13 05:52:27 +0200
committerDavid S. Miller2019-06-15 04:20:20 +0200
commitd5afa82c977ea06f7119058fa0eb8519ea501031 (patch)
tree1c8950af37bfb47eb9fd0774151d49d710ab8de7 /net/vmw_vsock/vsock_addr.c
parentMerge branch 'nfp-add-two-user-friendly-errors' (diff)
downloadkernel-qcow2-linux-d5afa82c977ea06f7119058fa0eb8519ea501031.tar.gz
kernel-qcow2-linux-d5afa82c977ea06f7119058fa0eb8519ea501031.tar.xz
kernel-qcow2-linux-d5afa82c977ea06f7119058fa0eb8519ea501031.zip
vsock: correct removal of socket from the list
The current vsock code for removal of socket from the list is both subject to race and inefficient. It takes the lock, checks whether the socket is in the list, drops the lock and if the socket was on the list, deletes it from the list. This is subject to race because as soon as the lock is dropped once it is checked for presence, that condition cannot be relied upon for any decision. It is also inefficient because if the socket is present in the list, it takes the lock twice. Signed-off-by: Sunil Muthuswamy <sunilmut@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/vmw_vsock/vsock_addr.c')
0 files changed, 0 insertions, 0 deletions