diff options
-rw-r--r-- | net/core/skbuff.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 844b8abeb18c..57555a4525da 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -2018,13 +2018,10 @@ void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len) | |||
2018 | skb_split_no_header(skb, skb1, len, pos); | 2018 | skb_split_no_header(skb, skb1, len, pos); |
2019 | } | 2019 | } |
2020 | 2020 | ||
2021 | /* Shifting from/to a cloned skb is a no-go. | 2021 | /* Shifting from/to a cloned skb is a no-go. */ |
2022 | * | ||
2023 | * TODO: handle cloned skbs by using pskb_expand_head() | ||
2024 | */ | ||
2025 | static int skb_prepare_for_shift(struct sk_buff *skb) | 2022 | static int skb_prepare_for_shift(struct sk_buff *skb) |
2026 | { | 2023 | { |
2027 | return skb_cloned(skb); | 2024 | return skb_cloned(skb) && pskb_expand_head(skb, 0, 0, GFP_ATOMIC); |
2028 | } | 2025 | } |
2029 | 2026 | ||
2030 | /** | 2027 | /** |