1. 11 3月, 2013 1 次提交
  2. 07 1月, 2013 1 次提交
  3. 04 1月, 2013 1 次提交
  4. 10 10月, 2012 1 次提交
  5. 17 7月, 2012 1 次提交
  6. 22 5月, 2012 1 次提交
  7. 25 3月, 2012 1 次提交
  8. 18 2月, 2012 1 次提交
  9. 18 8月, 2011 1 次提交
  10. 26 7月, 2011 1 次提交
  11. 30 9月, 2010 1 次提交
    • B
      um: Proper Fix for f25c80a4: remove duplicate structure field initialization · 9337057d
      Boaz Harrosh 提交于
      uml_net_set_mac() was broken and luckily it was never used, before.
      What it was trying to do is spin_lock before memcopy the mac address.
      Linus attempted to fix it in assumption that someone decided the
      lock was needed. But since it was never ever used at all, and was
      just dead code, I think we can assume that it is not needed, after
      all.
      
      On the other hand patch [f25c80a4] was trying to use eth_mac_addr()
      in eth_configure(), *which was the real fallout*. Because of state
      checks done inside eth_mac_addr() the address was never set. I have
      not reintroduced the memcpy wrapper, but I've put a comment for future
      cats.
      
      The code now is back to exactly as it was before [f25c80a4]. With
      the cleanup applied. If the spin_lock is indeed needed then a contender
      should supply a test case that fails, then fix it with the proper
      locking, as a separate unrelated patch.
      
      CC: Julia Lawall <julia@diku.dk>
      CC: David S. Miller <davem@davemloft.net>
      CC: Andrew Morton <akpm@linux-foundation.org>
      CC: Al Viro <viro@ZenIV.linux.org.uk>
      Tested-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9337057d
  12. 22 7月, 2010 1 次提交
    • J
      arch/um/drivers: remove duplicate structure field initialization · f25c80a4
      Julia Lawall 提交于
      There are two initializations of ndo_set_mac_address, one to a local
      function that is not used otherwise and one to a function that is defined
      elsewhere.
      
      The semantic match that finds this problem is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r@
      identifier I, s, fld;
      position p0,p;
      expression E;
      @@
      
      struct I s =@p0 { ... .fld@p = E, ...};
      
      @s@
      identifier I, s, r.fld;
      position r.p0,p;
      expression E;
      @@
      
      struct I s =@p0 { ... .fld@p = E, ...};
      
      @script:python@
      p0 << r.p0;
      fld << r.fld;
      ps << s.p;
      pr << r.p;
      @@
      
      if int(ps[0].line)<int(pr[0].line) or int(ps[0].column)<int(pr[0].column):
        cocci.print_main(fld,p0)
      // </smpl>
      
      akpm:
      
      - Use the standard eth_mac_addr() in uml_net_set_mac()
      
      - Remove unneeded and racy local set_ether_mac()
      
      - Remove duplicated (and incorrect)
        uml_netdev_ops.ndo_set_mac_address initializer.
      
      Fixes 8bb95b39 ("uml: convert network
      device to netdevice ops").
      
      [akpm@linux-foundation.org: rework as above]
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Cc: Stephen Hemminger <shemminger@vyatta.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f25c80a4
  13. 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
  14. 21 9月, 2009 1 次提交
  15. 02 9月, 2009 1 次提交
  16. 06 7月, 2009 1 次提交
  17. 16 6月, 2009 1 次提交
    • G
      uml: remove driver_data direct access of struct device · 8691b97b
      Greg Kroah-Hartman 提交于
      In the near future, the driver core is going to not allow direct access
      to the driver_data pointer in struct device.  Instead, the functions
      dev_get_drvdata() and dev_set_drvdata() should be used.  These functions
      have been around since the beginning, so are backwards compatible with
      all older kernel versions.
      
      Cc: user-mode-linux-devel@lists.sourceforge.net
      Cc: Jeff Dike <jdike@addtoit.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8691b97b
  18. 03 4月, 2009 1 次提交
  19. 27 3月, 2009 2 次提交
  20. 05 12月, 2008 1 次提交
  21. 28 10月, 2008 1 次提交
  22. 28 4月, 2008 1 次提交
  23. 26 3月, 2008 1 次提交
  24. 06 2月, 2008 2 次提交
  25. 11 12月, 2007 1 次提交
  26. 15 11月, 2007 1 次提交
  27. 17 10月, 2007 3 次提交
    • J
      uml: correctly handle skb allocation failures · 605c1e57
      Jeff Dike 提交于
      Handle memory allocation failures when reading packets.
      
      We have to read something from the host, even if we can't allocate any
      memory.  If we don't, the host side of the device may fill up and stop
      delivering interrupts because no new packets can be queued.
      
      A single sk_buff is allocated whenever an MTU is seen which is larger
      than any seen earlier.  This is used to read packets if there is a
      memory allocation failure.
      
      The large MTU check is done from eth_configure, which is called when a
      interface is added to the system.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      605c1e57
    • J
      uml: network driver MTU cleanups · b53f35a8
      Jeff Dike 提交于
      A bunch of MTU-related cleanups in the network code.
      
      First, there is the addition of the notion of a maximally-sized packet, which
      is the MTU plus headers.  This is used to size the skb that will receive a
      packet.  This allows ether_adjust_skb to go away, as it was used to resize the
      skb after it was allocated.
      
      Since the skb passed into the low-level read routine is no longer resized, and
      possibly reallocated, there, they (and the write routines) don't need to get
      an sk_buff **.  They just need the sk_buff * now.  The callers of
      ether_adjust_skb still need to do the skb_put, so that's now inlined.
      
      The MAX_PACKET definitions in most of the drivers are gone.
      
      The set_mtu methods were all the same and did nothing, so they can be
      removed.
      
      The ethertap driver had a typo which doubled the size of the packet rather
      than adding two bytes to it.  It also wasn't defining its setup_size, causing
      a zero-byte kmalloc and crash when the invalid pointer returned from kmalloc
      was dereferenced.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b53f35a8
    • J
      uml: network formatting · cd1ae0e4
      Jeff Dike 提交于
      Style and other non-functional changes in the UML networking code, including
      	include tidying
      	style violations
      	copyright updates
      	printks getting severities
      	userspace code calling libc directly rather than using the os_*
      wrappers
      
      There's also a exit path cleanup in the pcap driver.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd1ae0e4
  28. 25 7月, 2007 1 次提交
    • J
      uml: more __init annotations · 97a1fcbb
      Jeff Dike 提交于
      2.6.23-rc1 turned up another batch of references from non-__init code to
      __init code.  In most cases, these were missing __init annotations.  In one
      case (os_drop_memory), the annotation was present but wrong.
      
      init_maps is __init, but for some reason was being very careful about the
      mechanism by which it allocated memory, checking whether it was OK to use
      kmalloc (at this point in the boot, it definitely isn't) and using either
      alloc_bootmem_low_pages or kmalloc/vmalloc.  So, the kmalloc/vmalloc code is
      removed.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      97a1fcbb
  29. 09 5月, 2007 1 次提交
    • J
      uml: network and pcap cleanup · 7d98230a
      Jeff Dike 提交于
      Some network device cleanup.
      
      When setup_etheraddr found a globally valid MAC being assigned to an
      interface, it went ahead and used it rather than assigning a random MAC like
      the other cases do.  This isn't really an error like the others, but it seems
      consistent to make it behave the same.
      
      We were getting some duplicate kfree() in the error case in eth_configure
      because platform_device_unregister frees buffers that the error cases
      following tried to free again.
      
      The pcap initialization routine wasn't doing the proper printk of its
      information, causing a printk of the first part of that line to be
      unterminated by a newline.
      
      The pcap code had a bunch of style violations, which are now fixed.
      
      pcap_setup wasn't returning false when it detected an unrecognized
      option.
      
      The printks in pcap_user all got UM_KERN_BLAH prepended to their
      format strings.
      
      pcap_remove now checks for a non-NULL pcap structure before it calls
      pcap_close.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Acked-by: NPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7d98230a
  30. 08 5月, 2007 6 次提交
  31. 26 4月, 2007 1 次提交