[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080501.025635.216053297.davem@davemloft.net>
Date: Thu, 01 May 2008 02:56:35 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: johannes@...solutions.net
Cc: mb@...sch.de, netdev@...r.kernel.org,
linux-wireless@...r.kernel.org
Subject: Re: mac80211 truesize bugs
From: Johannes Berg <johannes@...solutions.net>
Date: Thu, 01 May 2008 11:48:19 +0200
> > Signed-off-by: David S. Miller <davem@...emloft.net>
>
> > + /* This is safe because the buffer has been orphaned. */
> > + skb->truesize += sizeof(*rthdr);
>
> Hmm. The disconnect between truesize and skb->len+sizeof(*skb) was
> usually 17 or 19 bytes and sizeof(*rthdr) is only 11. On the other hand,
> I don't see where the other bytes should be coming from. I'll give this
> a try, thanks.
Grrr, I bet it's coming from a combination of the
skb_set_mac_header(skb, 0); call done by mac80211 and the skb_push()
calls in net/packet/af_packet.c
davem@...set:~/src/GIT/net-2.6$ egrep skb_push net/packet/af_packet.c
skb_push(skb, skb->data - skb_mac_header(skb));
skb_push(skb, skb->data - skb_mac_header(skb));
skb_push(skb, skb->data - skb_mac_header(skb));
davem@...set:~/src/GIT/net-2.6$
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists