compat: backport truesize arg increase on skb_add_rx_frag()
authorLuis R. Rodriguez <mcgrof@frijolero.org>
Mon, 2 Apr 2012 22:55:19 +0000 (15:55 -0700)
committerLuis R. Rodriguez <mcgrof@frijolero.org>
Mon, 2 Apr 2012 23:22:52 +0000 (16:22 -0700)
commita3e5dc84419f03b0dd8bcd461426badc86498d3f
tree0509d2799efeff8123c03e76890fda4fe498ba5c
parent3c8d9d948438b72f779cc58f48bef907ac2c36fd
compat: backport truesize arg increase on skb_add_rx_frag()

This backports 50269e19 by just calling the older kernel routine,
and discarding the new argument. We treat kernels older than 2.6.28
a bit differently, given that those kernels lacked this routine
completely.

commit 50269e19ad990e79eeda101fc6df80cffd5d4831
Author: Eric Dumazet <eric.dumazet@gmail.com>
Date:   Fri Mar 23 23:59:33 2012 +0000

    net: add a truesize parameter to skb_add_rx_frag()

    skb_add_rx_frag() API is misleading.

    Network skbs built with this helper can use uncharged kernel memory and
    eventually stress/crash machine in OOM.

    Add a 'truesize' parameter and then fix drivers in followup patches.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
mcgrof@tux ~/linux-stable (git::master)$ git describe --contains 50269e19
v3.4-rc1~84^2~1

mcgrof@tux ~/compat (git::master)$ ckmake
Trying kernel                  3.3.0-030300rc2-generic  [OK]
Trying kernel                     3.2.2-030202-generic  [OK]
Trying kernel                    3.1.10-030110-generic  [OK]
Trying kernel                    3.0.18-030018-generic  [OK]
Trying kernel                  2.6.39-02063904-generic  [OK]
Trying kernel                  2.6.38-02063808-generic  [OK]
Trying kernel                  2.6.37-02063706-generic  [OK]
Trying kernel                  2.6.36-02063604-generic  [OK]
Trying kernel                  2.6.35-02063512-generic  [OK]
Trying kernel                  2.6.34-02063410-generic  [OK]
Trying kernel                  2.6.33-02063305-generic  [OK]
Trying kernel                  2.6.32-02063255-generic  [OK]
Trying kernel                  2.6.31-02063113-generic  [OK]
Trying kernel                  2.6.30-02063010-generic  [OK]
Trying kernel                  2.6.29-02062906-generic  [OK]
Trying kernel                  2.6.28-02062810-generic  [OK]
Trying kernel                    2.6.27-020627-generic  [OK]
Trying kernel                    2.6.26-020626-generic  [OK]
Trying kernel                    2.6.25-020625-generic  [OK]
Trying kernel                    2.6.24-020624-generic  [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
compat/compat-2.6.28.c
include/linux/compat-2.6.28.h
include/linux/compat-3.4.h