[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1JrW9h-0001tI-00@gondolin.me.apana.org.au>
Date: Thu, 01 May 2008 18:36:49 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: davem@...emloft.net (David Miller)
Cc: johannes@...solutions.net, mb@...sch.de, netdev@...r.kernel.org,
linux-wireless@...r.kernel.org
Subject: Re: mac80211 truesize bugs
David Miller <davem@...emloft.net> wrote:
>
> diff --git a/net/mac80211/main.c b/net/mac80211/main.c
> index 9ad4e36..de2e904 100644
> --- a/net/mac80211/main.c
> +++ b/net/mac80211/main.c
> @@ -1485,6 +1485,9 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb,
> rthdr = (struct ieee80211_tx_status_rtap_hdr*)
> skb_push(skb, sizeof(*rthdr));
> ^M
> + /* This is safe because the buffer has been orphaned. */
> + skb->truesize += sizeof(*rthdr);
skb->truesize should always account the skb->head area in its
entirety so we should never need to adjust it when pushing or
pulling. So I suggest we find the place that expanded the head
area and make the adjustment there. Alternative we could adjust
it right after the orphan call if the expansion occurs where we
can't adjust the truesize.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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