Displaying 2 results from an estimated 2 matches for "skb_set_owner_sk_saf".
Did you mean:
skb_set_owner_sk_safe
2023 Jun 01
0
[PATCH net] virtio/vsock: fix sock refcnt bug on owner set failure
...ort_common.c b/net/vmw_vsock/virtio_transport_common.c
>index b769fc258931..f01cd6adc5cb 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...
2023 Sep 04
0
[PATCH net-next v7 4/4] vsock/virtio: MSG_ZEROCOPY flag support
...non-linear skb will be
>>> created and filled with the pages of user's buffer. Pages of user's
>>> buffer are locked in memory by 'get_user_pages()'. Second thing that
>>> this patch does is replace type of skb owning: instead of calling
>>> 'skb_set_owner_sk_safe()' it calls 'skb_set_owner_w()'. Reason of this
>>> change is that '__zerocopy_sg_from_iter()' increments 'sk_wmem_alloc'
>>> of socket, so to decrease this field correctly proper skb destructor is
>>> needed: 'sock_wfree()'. This dest...