From: Johannes Berg <johannes@sipsolutions.net> Date: Thu, 01 May 2008 11:32:29 +0200I looked at the mac80211 code, the problem is the skb_push() you guys do in this situation. Things like loopback, which also orphan then reinject, don't trigger this problem because the re-input path trims things, never adds. The good news is that this is easy to fix. Since you've orphaned the SKB, simply adjust skb->truesize as you do pushes. Like this: mac80211: Adjust truesize in ieee80211_tx_status() when reinjecting. Signed-off-by: David S. Miller <davem@davemloft.net> 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)); + /* This is safe because the buffer has been orphaned. */ + skb->truesize += sizeof(*rthdr); + memset(rthdr, 0, sizeof(*rthdr)); rthdr->hdr.it_len = cpu_to_le16(sizeof(*rthdr)); rthdr->hdr.it_present =
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| debian developer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Adrian Bunk | Re: LSM conversion to static interface |
git: | |
| Gerrit Renker | [PATCH 26/37] dccp: Integration of dynamic feature activation - part 1 (socket set... |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Frans Pop | svc: failed to register lockdv1 RPC service (errno 97). |
| Linus Torvalds | Re: [GIT]: Networking |
