summaryrefslogtreecommitdiffstats
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2022-07-12 22:52:28 +0200
committerJakub Kicinski <kuba@kernel.org>2022-07-19 04:58:45 +0200
commit2e07a521e1e424787af3bfc59615de4220856c35 (patch)
tree5444a5c42b38fff579bc9ef95a8bb9b244fe77da /net/core/skbuff.c
parentskbuff: don't mix ubuf_info from different sources (diff)
downloadlinux-2e07a521e1e424787af3bfc59615de4220856c35.tar.xz
linux-2e07a521e1e424787af3bfc59615de4220856c35.zip
skbuff: add SKBFL_DONT_ORPHAN flag
We don't want to list every single ubuf_info callback in skb_orphan_frags(), add a flag controlling the behaviour. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r--net/core/skbuff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 09f56bfa2771..fc22b3d32052 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -1193,7 +1193,7 @@ static struct ubuf_info *msg_zerocopy_alloc(struct sock *sk, size_t size)
uarg->len = 1;
uarg->bytelen = size;
uarg->zerocopy = 1;
- uarg->flags = SKBFL_ZEROCOPY_FRAG;
+ uarg->flags = SKBFL_ZEROCOPY_FRAG | SKBFL_DONT_ORPHAN;
refcount_set(&uarg->refcnt, 1);
sock_hold(sk);