1. 14 6月, 2010 2 次提交
  2. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  3. 25 3月, 2010 1 次提交
  4. 20 2月, 2010 1 次提交
  5. 26 1月, 2010 1 次提交
  6. 20 1月, 2010 2 次提交
  7. 15 12月, 2009 1 次提交
    • P
      ipv6: reassembly: use seperate reassembly queues for conntrack and local delivery · 0b5ccb2e
      Patrick McHardy 提交于
      Currently the same reassembly queue might be used for packets reassembled
      by conntrack in different positions in the stack (PREROUTING/LOCAL_OUT),
      as well as local delivery. This can cause "packet jumps" when the fragment
      completing a reassembled packet is queued from a different position in the
      stack than the previous ones.
      
      Add a "user" identifier to the reassembly queue key to seperate the queues
      of each caller, similar to what we do for IPv4.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      0b5ccb2e
  8. 12 11月, 2009 1 次提交
    • E
      sysctl net: Remove unused binary sysctl code · f8572d8f
      Eric W. Biederman 提交于
      Now that sys_sysctl is a compatiblity wrapper around /proc/sys
      all sysctl strategy routines, and all ctl_name and strategy
      entries in the sysctl tables are unused, and can be
      revmoed.
      
      In addition neigh_sysctl_register has been modified to no longer
      take a strategy argument and it's callers have been modified not
      to pass one.
      
      Cc: "David Miller" <davem@davemloft.net>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: netdev@vger.kernel.org
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      f8572d8f
  9. 09 6月, 2009 1 次提交
  10. 16 3月, 2009 1 次提交
  11. 04 11月, 2008 1 次提交
    • A
      net: '&' redux · 6d9f239a
      Alexey Dobriyan 提交于
      I want to compile out proc_* and sysctl_* handlers totally and
      stub them to NULL depending on config options, however usage of &
      will prevent this, since taking adress of NULL pointer will break
      compilation.
      
      So, drop & in front of every ->proc_handler and every ->strategy
      handler, it was never needed in fact.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6d9f239a
  12. 01 10月, 2008 1 次提交
    • I
      ipv6: almost identical frag hashing funcs combined · 93c8b90f
      Ilpo Järvinen 提交于
      $ diff-funcs ip6qhashfn reassembly.c netfilter/nf_conntrack_reasm.c
       --- reassembly.c:ip6qhashfn()
       +++ netfilter/nf_conntrack_reasm.c:ip6qhashfn()
      @@ -1,5 +1,5 @@
      -static unsigned int ip6qhashfn(__be32 id, struct in6_addr *saddr,
      -			       struct in6_addr *daddr)
      +static unsigned int ip6qhashfn(__be32 id, const struct in6_addr *saddr,
      +			       const struct in6_addr *daddr)
       {
       	u32 a, b, c;
      
      @@ -9,7 +9,7 @@
      
       	a += JHASH_GOLDEN_RATIO;
       	b += JHASH_GOLDEN_RATIO;
      -	c += ip6_frags.rnd;
      +	c += nf_frags.rnd;
       	__jhash_mix(a, b, c);
      
       	a += (__force u32)saddr->s6_addr32[3];
      
      And codiff xx.o.old xx.o.new:
      
      net/ipv6/netfilter/nf_conntrack_reasm.c:
        ip6qhashfn         | -512
        nf_hashfn          |   +6
        nf_ct_frag6_gather |  +36
       3 functions changed, 42 bytes added, 512 bytes removed, diff: -470
      net/ipv6/reassembly.c:
        ip6qhashfn    | -512
        ip6_hashfn    |   +7
        ipv6_frag_rcv |  +89
       3 functions changed, 96 bytes added, 512 bytes removed, diff: -416
      
      net/ipv6/reassembly.c:
        inet6_hash_frag | +510
       1 function changed, 510 bytes added, diff: +510
      
      Total: -376
      
      Compile tested.
      Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Acked-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      93c8b90f
  13. 26 7月, 2008 1 次提交
  14. 28 6月, 2008 1 次提交
  15. 05 6月, 2008 1 次提交
    • J
      netfilter: nf_conntrack_ipv6: fix inconsistent lock state in nf_ct_frag6_gather() · b9c69896
      Jarek Poplawski 提交于
      [   63.531438] =================================
      [   63.531520] [ INFO: inconsistent lock state ]
      [   63.531520] 2.6.26-rc4 #7
      [   63.531520] ---------------------------------
      [   63.531520] inconsistent {softirq-on-W} -> {in-softirq-W} usage.
      [   63.531520] tcpsic6/3864 [HC0[0]:SC1[1]:HE1:SE0] takes:
      [   63.531520]  (&q->lock#2){-+..}, at: [<c07175b0>] ipv6_frag_rcv+0xd0/0xbd0
      [   63.531520] {softirq-on-W} state was registered at:
      [   63.531520]   [<c0143bba>] __lock_acquire+0x3aa/0x1080
      [   63.531520]   [<c0144906>] lock_acquire+0x76/0xa0
      [   63.531520]   [<c07a8f0b>] _spin_lock+0x2b/0x40
      [   63.531520]   [<c0727636>] nf_ct_frag6_gather+0x3f6/0x910
       ...
      
      According to this and another similar lockdep report inet_fragment
      locks are taken from nf_ct_frag6_gather() with softirqs enabled, but
      these locks are mainly used in softirq context, so disabling BHs is
      necessary.
      Reported-and-tested-by: NEric Sesterhenn <snakebyte@gmx.de>
      Signed-off-by: NJarek Poplawski <jarkao2@gmail.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b9c69896
  16. 14 4月, 2008 1 次提交
  17. 29 3月, 2008 2 次提交
  18. 01 2月, 2008 1 次提交
    • P
      [NETFILTER]: nf_conntrack_ipv6: fix sparse warnings · 99fa5f53
      Patrick McHardy 提交于
        CHECK   net/ipv6/netfilter/nf_conntrack_reasm.c
        net/ipv6/netfilter/nf_conntrack_reasm.c:77:18: warning: symbol 'nf_ct_ipv6_sysctl_table' was not declared. Should it be static?
        net/ipv6/netfilter/nf_conntrack_reasm.c:586:16: warning: symbol 'nf_ct_frag6_gather' was not declared. Should it be static?
        net/ipv6/netfilter/nf_conntrack_reasm.c:662:6: warning: symbol 'nf_ct_frag6_output' was not declared. Should it be static?
        net/ipv6/netfilter/nf_conntrack_reasm.c:683:5: warning: symbol 'nf_ct_frag6_kfree_frags' was not declared. Should it be static?
        net/ipv6/netfilter/nf_conntrack_reasm.c:698:5: warning: symbol 'nf_ct_frag6_init' was not declared. Should it be static?
        net/ipv6/netfilter/nf_conntrack_reasm.c:717:6: warning: symbol 'nf_ct_frag6_cleanup' was not declared. Should it be static?
      
      Based on patch by Stephen Hemminger with suggestions by Yasuyuki KOZAKAI.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      99fa5f53
  19. 29 1月, 2008 8 次提交
  20. 18 10月, 2007 6 次提交
  21. 16 10月, 2007 5 次提交