search for: sk_refcnt

Displaying 1 result from an estimated 1 matches for "sk_refcnt".

Did you mean: s_refcnt
2023 Jun 01
0
[PATCH net] virtio/vsock: fix sock refcnt bug on owner set failure
...c5cb 100644 >--- a/net/vmw_vsock/virtio_transport_common.c >+++ b/net/vmw_vsock/virtio_transport_common.c >@@ -1343,6 +1343,7 @@ void virtio_transport_recv_pkt(struct virtio_transport *t, > > if (!skb_set_owner_sk_safe(skb, sk)) { > WARN_ONCE(1, "receiving vsock socket has sk_refcnt == 0\n"); >+ sock_put(sk); Did you have any warning, issue here? IIUC skb_set_owner_sk_safe() can return false only if the ref counter is 0, so calling a sock_put() on it should have no effect except to produce a warning. Thanks, Stefano