Re: mac80211 truesize bugs

Johannes Berg
2008-05-03T23:25:01Z

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

> > @@ -699,6 +699,12 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
> > if (skb_shared(skb))
> > BUG();
> >
> > + if (unlikely((nhead || ntail) && skb->sk)) {
> > + printk(KERN_ERR "SKB BUG: Illegal pskb expand (%d:%d) "
> > + "with socket attached\n",
> > + nhead, ntail);
> > + }
> > +
> > size = SKB_DATA_ALIGN(size);
>
> Ok I think I'm starting to understand this a little better. However,
> shouldn't this function update skb->truesize so if the skb is later
> attached to a different socket again it has the right size?

Judging from some of the callers, the caller should. Why?!