1. 06 5月, 2011 1 次提交
  2. 28 1月, 2011 1 次提交
  3. 27 9月, 2010 1 次提交
  4. 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
  5. 04 1月, 2010 1 次提交
  6. 04 12月, 2009 1 次提交
  7. 26 11月, 2009 1 次提交
  8. 03 9月, 2009 1 次提交
    • R
      NET: Fix possible corruption in bpqether driver · 3eb00275
      Ralf Baechle 提交于
      The bpq ether driver is modifying the data art of the skb by first
      dropping the KISS byte (a command byte for the radio) then prepending the
      length + 4 of the remaining AX.25 packet to be transmitted as a little
      endian 16-bit number.  If the high byte of the length has a different
      value than the dropped KISS byte users of clones of the skb may observe
      this as corruption.  This was observed with by running listen(8) -a which
      uses a packet socket which clones transmit packets.  The corruption will
      then typically be displayed for as a KISS "TX Delay" command for AX.25
      packets in the range of 252..508 bytes or any other KISS command for
      yet larger packets.
      
      Fixed by using skb_cow to create a private copy should the skb be cloned.
      Using skb_cow also allows us to cleanup the old logic to ensure sufficient
      headroom in the skb.
      
      While at it, replace a return of 0 from bpq_xmit with the proper constant
      NETDEV_TX_OK which is now being used everywhere else in this function.
      
      Affected: all 2.2, 2.4 and 2.6 kernels.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Reported-by: NJann Traschewski <jann@gmx.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3eb00275
  9. 01 9月, 2009 1 次提交
  10. 06 7月, 2009 1 次提交
  11. 17 6月, 2009 1 次提交
  12. 13 6月, 2009 1 次提交
  13. 10 3月, 2009 1 次提交
  14. 18 2月, 2009 2 次提交
    • H
      drivers/net/hamradio: fix sparse warning: context imbalance · e334f564
      Hannes Eder 提交于
      Impact: Attribute functions with __acquires(...) resp. __releases(...).
      
      Fix this sparse warnings:
        drivers/net/hamradio/bpqether.c:387:13: warning: context imbalance in 'bpq_seq_start' - wrong count at exit
        drivers/net/hamradio/bpqether.c:419:13: warning: context imbalance in 'bpq_seq_stop' - unexpected unlock
      Signed-off-by: NHannes Eder <hannes@hanneseder.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e334f564
    • H
      drivers/net/hamradio: fix warning: format not a string literal and no ... · eb33ae24
      Hannes Eder 提交于
      Impact: Use 'static const char[]' instead of 'static char[]' and while
      being at it fix an issue in 'mkiss_init_driver', where in case of an
      error the status code was not passed to printk.
      
      Fix this warnings:
        drivers/net/hamradio/6pack.c: In function 'sixpack_init_driver':
        drivers/net/hamradio/6pack.c:802: warning: format not a string literal and no format arguments
        drivers/net/hamradio/bpqether.c: In function 'bpq_init_driver':
        drivers/net/hamradio/bpqether.c:609: warning: format not a string literal and no format arguments
        drivers/net/hamradio/mkiss.c: In function 'mkiss_init_driver':
        drivers/net/hamradio/mkiss.c:988: warning: format not a string literal and no format arguments
        drivers/net/hamradio/mkiss.c:991: warning: format not a string literal and no format arguments
        drivers/net/hamradio/scc.c: In function 'scc_init_driver':
        drivers/net/hamradio/scc.c:2109: warning: format not a string literal and no format arguments
        drivers/net/hamradio/yam.c: In function 'yam_init_driver':
        drivers/net/hamradio/yam.c:1094: warning: format not a string literal and no format arguments
      Signed-off-by: NHannes Eder <hannes@hanneseder.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eb33ae24
  15. 01 2月, 2009 1 次提交
  16. 22 1月, 2009 3 次提交
  17. 04 11月, 2008 1 次提交
  18. 28 10月, 2008 1 次提交
  19. 23 7月, 2008 1 次提交
  20. 18 7月, 2008 1 次提交
    • D
      netdev: Allocate multiple queues for TX. · e8a0464c
      David S. Miller 提交于
      alloc_netdev_mq() now allocates an array of netdev_queue
      structures for TX, based upon the queue_count argument.
      
      Furthermore, all accesses to the TX queues are now vectored
      through the netdev_get_tx_queue() and netdev_for_each_tx_queue()
      interfaces.  This makes it easy to grep the tree for all
      things that want to get to a TX queue of a net device.
      
      Problem spots which are not really multiqueue aware yet, and
      only work with one queue, can easily be spotted by grepping
      for all netdev_get_tx_queue() calls that pass in a zero index.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e8a0464c
  21. 09 7月, 2008 1 次提交
  22. 26 3月, 2008 1 次提交
  23. 11 10月, 2007 6 次提交
  24. 01 8月, 2007 1 次提交
  25. 26 4月, 2007 1 次提交
  26. 13 2月, 2007 1 次提交
  27. 09 12月, 2006 1 次提交
  28. 11 7月, 2006 1 次提交
  29. 01 7月, 2006 1 次提交
  30. 19 10月, 2005 1 次提交
    • R
      [PATCH] rcu in bpqether driver. · bc0a7438
      Ralf Baechle 提交于
      From Suzanne Wood <suzannew@cs.pdx.edu>:
      
      Clarify RCU implementation in bpqether.c.
      
      Because bpq_new_device() calls list_add_rcu() and bpq_free_device() calls
      list_del_rcu(), substitute list_for_each_entry_rcu() for
      list_for_each_entry() in bpq_get_ax25_dev() and in bpq_seq_start().
      
      Add rcu dereference protection in bpq_seq_next().
      
      The rcu_read_lock()/unlock() in bpq_device_event() are removed because
      netdev event handlers are called with RTNL locking in place.
      
      FYI: bpq_free_device() calls list_del_rcu() which, per list.h, requires
      synchronize_rcu() which can block or call_rcu() or call_rcu_bh() which
      cannot block.  Herbert Xu notes that synchronization is done here by
      unregister_netdevice().  This calls synchronize_net() which in turn uses
      synchronize_rcu().
      Signed-off-by: NRalf Baechle DL5RB <ralf@linux-mips.org>
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      bc0a7438
  31. 13 9月, 2005 1 次提交
  32. 30 8月, 2005 1 次提交
    • D
      [NET]: Kill skb->real_dev · f2ccd8fa
      David S. Miller 提交于
      Bonding just wants the device before the skb_bond()
      decapsulation occurs, so simply pass that original
      device into packet_type->func() as an argument.
      
      It remains to be seen whether we can use this same
      exact thing to get rid of skb->input_dev as well.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f2ccd8fa