• S
    vsock: correct removal of socket from the list · d5afa82c
    Sunil Muthuswamy 提交于
    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: NSunil Muthuswamy <sunilmut@microsoft.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    d5afa82c
af_vsock.c 48.0 KB