On Wed, 2017-01-25 at 14:03 -0500, David Miller wrote: > From: Eric Dumazet <eric.duma...@gmail.com> > Date: Wed, 25 Jan 2017 10:38:52 -0800 > > > Do you think we could change __pskb_pull_tail() right away and fix the > > few places that would break, or should we add various helpers with extra > > parameters to take a safe route ? > > It should always be safe as long as we see no socket attached on RX, > right? > > That's the only real case where truesize adjustments can cause trouble. Queue can be virtual, as for xmit path, tracking skb->truesize in sk->sk_wmem_alloc.
If a layer calls pskb_may_pull(), we can not change skb->truesize without also changing skb->sk->sk_wmem_alloc, or sock_wfree() will trigger bugs.