653-disable_netlink_trim.patch 613 B

123456789101112131415161718192021222324252627
  1. --- a/net/netlink/af_netlink.c
  2. +++ b/net/netlink/af_netlink.c
  3. @@ -1241,24 +1241,7 @@ void netlink_detachskb(struct sock *sk,
  4. static struct sk_buff *netlink_trim(struct sk_buff *skb, gfp_t allocation)
  5. {
  6. - int delta;
  7. -
  8. WARN_ON(skb->sk != NULL);
  9. - delta = skb->end - skb->tail;
  10. - if (is_vmalloc_addr(skb->head) || delta * 2 < skb->truesize)
  11. - return skb;
  12. -
  13. - if (skb_shared(skb)) {
  14. - struct sk_buff *nskb = skb_clone(skb, allocation);
  15. - if (!nskb)
  16. - return skb;
  17. - consume_skb(skb);
  18. - skb = nskb;
  19. - }
  20. -
  21. - if (!pskb_expand_head(skb, 0, -delta, allocation))
  22. - skb->truesize -= delta;
  23. -
  24. return skb;
  25. }