653-disable_netlink_trim.patch 572 B

12345678910111213141516171819202122232425262728
  1. --- a/net/netlink/af_netlink.c
  2. +++ b/net/netlink/af_netlink.c
  3. @@ -854,25 +854,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. skb_orphan(skb);
  9. -
  10. - delta = skb->end - skb->tail;
  11. - if (delta * 2 < skb->truesize)
  12. - return skb;
  13. -
  14. - if (skb_shared(skb)) {
  15. - struct sk_buff *nskb = skb_clone(skb, allocation);
  16. - if (!nskb)
  17. - return skb;
  18. - kfree_skb(skb);
  19. - skb = nskb;
  20. - }
  21. -
  22. - if (!pskb_expand_head(skb, 0, -delta, allocation))
  23. - skb->truesize -= delta;
  24. -
  25. return skb;
  26. }