Commit ddeeabbc authored by Vasily Averin's avatar Vasily Averin Committed by Ziyang Xuan
Browse files

skbuff: introduce skb_expand_head()

mainline inclusion
from mainline-v5.15-rc1
commit f1260ff1
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9HVTH


CVE: CVE-2024-26921

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

Like skb_realloc_headroom(), new helper increases headroom of specified skb.
Unlike skb_realloc_headroom(), it does not allocate a new skb if possible;
copies skb->sk on new skb when as needed and frees original skb in case
of failures.

This helps to simplify ip[6]_finish_output2() and a few other similar cases.

Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarZiyang Xuan <william.xuanziyang@huawei.com>
parent a786a35e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment