“471c967737c2ba413e0b32024ab62a0dad27c26c”上不存在“test/git@gitcode.net:openanolis/dragonwell8_jdk.git”
提交 f91d76c8 编写于 作者: J Jonathan Lemon 提交者: Zheng Zengkai

skbuff: Call skb_zcopy_clear() before unref'ing fragments

mainline inclusion
from mainline-v5.12-rc1-dontuse
commit 70c43167
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4CVS3
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=70c4316749f6

----------------------------------------------------------------------

RX zerocopy fragment pages which are not allocated from the
system page pool require special handling.  Give the callback
in skb_zcopy_clear() a chance to process them first.
Signed-off-by: NJonathan Lemon <jonathan.lemon@gmail.com>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
Reviewed-by: NYongxin Li <liyongxin1@huawei.com>
Signed-off-by: NJunxin Chen <chenjunxin1@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 9b9ef692
...@@ -614,13 +614,14 @@ static void skb_release_data(struct sk_buff *skb) ...@@ -614,13 +614,14 @@ static void skb_release_data(struct sk_buff *skb)
&shinfo->dataref)) &shinfo->dataref))
return; return;
skb_zcopy_clear(skb, true);
for (i = 0; i < shinfo->nr_frags; i++) for (i = 0; i < shinfo->nr_frags; i++)
__skb_frag_unref(&shinfo->frags[i]); __skb_frag_unref(&shinfo->frags[i]);
if (shinfo->frag_list) if (shinfo->frag_list)
kfree_skb_list(shinfo->frag_list); kfree_skb_list(shinfo->frag_list);
skb_zcopy_clear(skb, true);
skb_free_head(skb); skb_free_head(skb);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册