653-disable_netlink_trim.patch 611 B

1234567891011121314151617181920212223242526
  1. --- a/net/netlink/af_netlink.c
  2. +++ b/net/netlink/af_netlink.c
  3. @@ -1154,23 +1154,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. return skb;
  24. }