netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mac80211 truesize bugs
@ 2008-05-01  2:02 Johannes Berg
       [not found] ` <1209607368.7173.20.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
  2008-05-04  1:55 ` frame status API? (was: mac80211 truesize bugs) Johannes Berg
  0 siblings, 2 replies; 68+ messages in thread
From: Johannes Berg @ 2008-05-01  2:02 UTC (permalink / raw)
  To: netdev; +Cc: linux-wireless

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

Hi,

Whenever you run a monitor interface in mac80211, you can see lots of
truesize bugs:

SKB BUG: Invalid truesize (464) len=307, sizeof(sk_buff)=176

It appears to be caused by mac80211's re-injection of the transmitted
frame. For those not familiar, here's what happens:

When a frame comes in on say wlan0's hard_start_xmit(), it is prepared
for transmission by the code there (802.11 headers added etc.) and then
scheduled to the master interface. Once it arrives on the master
(wmaster0) interface's hard_start_xmit(), it is modified again and
finally handed to the driver.

When the driver has transmitted the frame (successfully or not) it
reports the status of the transmission to mac80211 including the skb the
driver was given. At that point, things go different depending on
circumstances.

If no monitor interfaces are present, mac80211 simply orphans the skb
and destroys it. If there are monitor interfaces, it pushes some data
into the skb (the radiotap transmit status) and hands clones of the skb
to netif_rx() for each monitor interface, or the skb itself for the last
interface in the list.

All this is in net/mac80211/main.c:ieee80211_tx_status.

Now, the thing is that the skb truesize bug ONLY occurs when the last
part here is done when a radiotap monitor interface is present, if you
add

	dev_kfree_skb(skb);
	return;

in that function somewhere before the skb_orphan() call it never
happens. Hence, I'm confused. Since I only have a single monitor
interface when this happens, it can't be due to af_packet either,
afaict.

Can anyone help me diagnose this?

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 68+ messages in thread

end of thread, other threads:[~2008-05-13 22:09 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-01  2:02 mac80211 truesize bugs Johannes Berg
     [not found] ` <1209607368.7173.20.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-01  8:58   ` Michael Buesch
2008-05-01  9:08     ` Johannes Berg
     [not found]       ` <1209632886.4008.8.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-01  9:20         ` David Miller
2008-05-01  9:32           ` Johannes Berg
2008-05-01  9:43             ` David Miller
     [not found]               ` <20080501.024320.212547875.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2008-05-01  9:48                 ` Johannes Berg
2008-05-01  9:56                   ` David Miller
     [not found]                     ` <20080501.025635.216053297.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2008-05-01 10:08                       ` Johannes Berg
2008-05-01 10:32                         ` David Miller
     [not found]                           ` <20080501.033221.193705040.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2008-05-01 10:45                             ` Johannes Berg
2008-05-01 10:36                 ` Herbert Xu
2008-05-01 10:49                   ` David Miller
2008-05-01 10:53                     ` David Miller
2008-05-01 10:58                       ` Johannes Berg
     [not found]                         ` <1209639500.7067.0.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-01 11:03                           ` Herbert Xu
2008-05-02 20:38                             ` Johannes Berg
     [not found]                               ` <1209760731.3608.17.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-02 23:33                                 ` David Miller
2008-05-03  9:37                                   ` Johannes Berg
2008-05-03 14:25                                     ` Johannes Berg
2008-05-13  3:17                                       ` David Miller
     [not found]                                         ` <20080512.201751.114868351.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2008-05-13 20:39                                           ` John W. Linville
2008-05-13 20:59                                             ` Johannes Berg
2008-05-13 21:12                                               ` Tomas Winkler
2008-05-13 21:37                                                 ` Johannes Berg
     [not found]                                                   ` <1210714643.4279.27.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-13 22:09                                                     ` David Miller
2008-05-03 11:52                                   ` Johannes Berg
     [not found]                                     ` <1209815533.3987.21.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-04  1:03                                       ` David Miller
     [not found]                                         ` <20080503.180300.10562559.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2008-05-04  1:42                                           ` Johannes Berg
     [not found]                                             ` <1209865354.6210.23.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-04  2:02                                               ` Herbert Xu
     [not found]                                                 ` <20080504020203.GA30514-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2008-05-04  2:08                                                   ` Johannes Berg
     [not found]                                                     ` <1209866916.6210.39.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-04  2:12                                                       ` Herbert Xu
     [not found]                                                         ` <20080504021213.GA30660-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2008-05-04  2:22                                                           ` Johannes Berg
     [not found]                                                             ` <1209867740.6210.46.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-04  3:16                                                               ` Herbert Xu
     [not found]                                                                 ` <20080504031652.GA30993-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2008-05-04  8:47                                                                   ` Johannes Berg
     [not found]                                                                     ` <1209890847.6210.51.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-04  9:14                                                                       ` Johannes Berg
     [not found]                                                                         ` <1209892489.6210.56.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-04  9:44                                                                           ` Herbert Xu
2008-05-04  9:52                                                                             ` Johannes Berg
2008-05-04 11:25                                                                               ` Johannes Berg
     [not found]                                                                                 ` <1209900355.6210.64.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-04 12:28                                                                                   ` Johannes Berg
2008-05-04 12:45                                                                                     ` Herbert Xu
     [not found]                                                                                       ` <20080504124542.GA1455-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2008-05-04 12:48                                                                                         ` Johannes Berg
2008-05-04 12:52                                                                                         ` Johannes Berg
     [not found]                                                                                           ` <1209905561.4065.23.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-04 12:56                                                                                             ` Herbert Xu
     [not found]                                                                                               ` <20080504125652.GA1618-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2008-05-04 13:00                                                                                                 ` Johannes Berg
2008-05-04 14:06                                                                                         ` Johannes Berg
     [not found]                                                                                           ` <1209909990.3753.0.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-04 16:03                                                                                             ` Johannes Berg
     [not found]                                                                                               ` <1209917006.3753.2.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-04 17:47                                                                                                 ` Johannes Berg
2008-05-04 22:45                                                                                             ` David Miller
     [not found]                                                                                               ` <20080504.154540.214129591.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2008-05-04 22:48                                                                                                 ` Johannes Berg
2008-05-04 22:38                                                                 ` David Miller
2008-05-04  2:09                                               ` Johannes Berg
     [not found]                             ` <20080501110341.GD7490-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2008-05-03 12:38                               ` Johannes Berg
2008-05-03 12:59                                 ` Herbert Xu
     [not found]                                   ` <20080503125940.GA26199-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2008-05-03 16:03                                     ` Johannes Berg
     [not found]                                       ` <1209830582.3673.8.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-03 22:56                                         ` Johannes Berg
2008-05-03 23:07                                           ` David Miller
     [not found]                                             ` <20080503.160705.78111001.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2008-05-03 23:15                                               ` Johannes Berg
     [not found]                     ` <20080501.034950.261408566.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2008-05-01 11:02                       ` Herbert Xu
2008-05-01 11:38                       ` Johannes Berg
     [not found]                         ` <1209641914.3904.0.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-03 23:24                           ` Johannes Berg
     [not found]                             ` <1209857088.3920.4.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2008-05-03 23:32                               ` David Miller
     [not found]                                 ` <20080503.163202.48704621.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2008-05-03 23:43                                   ` Johannes Berg
2008-05-01 11:49                       ` Johannes Berg
2008-05-01 12:05                     ` Johannes Berg
2008-05-01  9:32         ` Michael Buesch
     [not found]           ` <200805011132.24399.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
2008-05-01  9:34             ` Johannes Berg
2008-05-04  1:55 ` frame status API? (was: mac80211 truesize bugs) Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).