skmsg: Get rid of skb_clone()
authorCong Wang <cong.wang@bytedance.com>
Wed, 15 Jun 2022 16:20:13 +0000 (09:20 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 20 Jun 2022 12:05:52 +0000 (14:05 +0200)
commit57452d767feaeab405de3bff0d240c3ac84bfe0d
tree3462cefaa340f3d51248adfee7feb7bedf879b19
parent965b57b469a589d64d81b1688b38dcb537011bb0
skmsg: Get rid of skb_clone()

With ->read_skb() now we have an entire skb dequeued from
receive queue, now we just need to grab an addtional refcnt
before passing its ownership to recv actors.

And we should not touch them any more, particularly for
skb->sk. Fortunately, skb->sk is already set for most of
the protocols except UDP where skb->sk has been stolen,
so we have to fix it up for UDP case.

Signed-off-by: Cong Wang <cong.wang@bytedance.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20220615162014.89193-4-xiyou.wangcong@gmail.com
net/core/skmsg.c
net/ipv4/udp.c