uclient: update to Git HEAD (2024-04-19)
[openwrt/openwrt.git] / target / linux / generic / patches-4.4 / 653-disable_netlink_trim.patch
1 --- a/net/netlink/af_netlink.c
2 +++ b/net/netlink/af_netlink.c
3 @@ -1795,27 +1795,7 @@ void netlink_detachskb(struct sock *sk,
4
5 static struct sk_buff *netlink_trim(struct sk_buff *skb, gfp_t allocation)
6 {
7 - int delta;
8 -
9 WARN_ON(skb->sk != NULL);
10 - if (netlink_skb_is_mmaped(skb))
11 - return skb;
12 -
13 - delta = skb->end - skb->tail;
14 - if (is_vmalloc_addr(skb->head) || delta * 2 < skb->truesize)
15 - return skb;
16 -
17 - if (skb_shared(skb)) {
18 - struct sk_buff *nskb = skb_clone(skb, allocation);
19 - if (!nskb)
20 - return skb;
21 - consume_skb(skb);
22 - skb = nskb;
23 - }
24 -
25 - if (!pskb_expand_head(skb, 0, -delta, allocation))
26 - skb->truesize -= delta;
27 -
28 return skb;
29 }
30