Eric Dumazet ed90542b0c iwlwifi: fix skb truesize underestimation
By default, iwlwifi uses order-1 pages (8 KB) to store incoming frames,
but doesnt say so in skb->truesize.

This makes very possible to exhaust kernel memory since these skb evade
normal socket memory accounting.

As struct ieee80211_hdr is going to be pulled before calling IP stack,
there is no need to use dev_alloc_skb() to reserve NET_SKB_PAD bytes.
alloc_skb() is ok in this driver, allowing more tailroom.

Pull beginning of frame in skb header, in the hope we can reuse order-1
pages in the driver immediately for small frames and reduce their
truesize to the minimum (linear skbs)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Neal Cardwell <ncardwell@google.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-03 10:52:30 -04:00
..
2012-01-24 14:08:36 -05:00
2012-01-24 14:08:36 -05:00
2012-01-24 14:08:36 -05:00
2012-01-24 14:08:36 -05:00
2012-03-06 15:16:11 -05:00
2012-01-24 14:08:36 -05:00
2012-01-24 14:08:36 -05:00
2012-03-06 15:16:11 -05:00
2012-03-12 14:22:10 -04:00
2012-03-08 13:59:50 -05:00
2012-03-08 13:59:55 -05:00
2012-01-24 14:08:36 -05:00
2012-03-07 13:56:34 -05:00
2012-03-06 15:16:11 -05:00
2012-03-08 13:59:55 -05:00
2012-01-24 14:08:36 -05:00
2012-03-08 13:59:55 -05:00
2012-03-12 14:22:09 -04:00
2012-03-12 14:22:09 -04:00
2012-03-08 13:59:53 -05:00