1. 26 4月, 2007 12 次提交
  2. 04 4月, 2007 1 次提交
    • E
      [PATCH] net: Ignore sysfs network device rename bugs. · 92749821
      Eric W. Biederman 提交于
      The generic networking code ensures that no two networking devices
      have the same name, so  there is no time except when sysfs has
      implementation bugs that device_rename when called from
      dev_change_name will fail.
      
      The current error handling for errors from device_rename in
      dev_change_name is wrong and results in an unusable and unrecoverable
      network device if device_rename is happens to return an error.
      
      This patch removes the buggy error handling.  Which confines the mess
      when device_rename hits a problem to sysfs, instead of propagating it
      the rest of the network stack.  Making linux a little more robust.
      
      Without this patch you can observe what happens when sysfs has a bug
      when CONFIG_SYSFS_DEPRECATED is not set and you attempt to rename
      a real network device to a name like (broken_parity_status, device,
      modalias, power, resource2, subsystem_vendor, class,  driver, irq,
      msi_bus, resource, subsystem, uevent, config, enable, local_cpus,
      numa_node, resource0, subsystem_device, vendor)
      
      Greg has a patch that fixes the sysfs bugs but he doesn't trust it
      for a 2.6.21 timeframe.  This patch which just ignores errors should
      be safe and it keeps the system from going completely wacky.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      92749821
  3. 30 3月, 2007 1 次提交
  4. 26 3月, 2007 1 次提交
  5. 13 2月, 2007 1 次提交
  6. 11 2月, 2007 1 次提交
  7. 09 2月, 2007 1 次提交
  8. 08 2月, 2007 1 次提交
  9. 08 12月, 2006 1 次提交
  10. 03 12月, 2006 4 次提交
  11. 02 12月, 2006 1 次提交
  12. 17 10月, 2006 1 次提交
  13. 29 9月, 2006 1 次提交
    • P
      [NET_SCHED]: Fix fallout from dev->qdisc RCU change · 85670cc1
      Patrick McHardy 提交于
      The move of qdisc destruction to a rcu callback broke locking in the
      entire qdisc layer by invalidating previously valid assumptions about
      the context in which changes to the qdisc tree occur.
      
      The two assumptions were:
      
      - since changes only happen in process context, read_lock doesn't need
        bottem half protection. Now invalid since destruction of inner qdiscs,
        classifiers, actions and estimators happens in the RCU callback unless
        they're manually deleted, resulting in dead-locks when read_lock in
        process context is interrupted by write_lock_bh in bottem half context.
      
      - since changes only happen under the RTNL, no additional locking is
        necessary for data not used during packet processing (f.e. u32_list).
        Again, since destruction now happens in the RCU callback, this assumption
        is not valid anymore, causing races while using this data, which can
        result in corruption or use-after-free.
      
      Instead of "fixing" this by disabling bottem halfs everywhere and adding
      new locks/refcounting, this patch makes these assumptions valid again by
      moving destruction back to process context. Since only the dev->qdisc
      pointer is protected by RCU, but ->enqueue and the qdisc tree are still
      protected by dev->qdisc_lock, destruction of the tree can be performed
      immediately and only the final free needs to happen in the rcu callback
      to make sure dev_queue_xmit doesn't access already freed memory.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      85670cc1
  14. 23 9月, 2006 2 次提交
  15. 18 8月, 2006 2 次提交
  16. 03 8月, 2006 3 次提交
  17. 09 7月, 2006 1 次提交
  18. 08 7月, 2006 1 次提交
  19. 01 7月, 2006 1 次提交
  20. 30 6月, 2006 2 次提交
    • H
      [NET]: Make illegal_highdma more anal · 3d3a8533
      Herbert Xu 提交于
      Rather than having illegal_highdma as a macro when HIGHMEM is off, we
      can turn it into an inline function that returns zero.  This will catch
      callers that give it bad arguments.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3d3a8533
    • H
      [NET]: Added GSO header verification · 576a30eb
      Herbert Xu 提交于
      When GSO packets come from an untrusted source (e.g., a Xen guest domain),
      we need to verify the header integrity before passing it to the hardware.
      
      Since the first step in GSO is to verify the header, we can reuse that
      code by adding a new bit to gso_type: SKB_GSO_DODGY.  Packets with this
      bit set can only be fed directly to devices with the corresponding bit
      NETIF_F_GSO_ROBUST.  If the device doesn't have that bit, then the skb
      is fed to the GSO engine which will allow the packet to be sent to the
      hardware if it passes the header check.
      
      This patch changes the sg flag to a full features flag.  The same method
      can be used to implement TSO ECN support.  We simply have to mark packets
      with CWR set with SKB_GSO_ECN so that only hardware with a corresponding
      NETIF_F_TSO_ECN can accept them.  The GSO engine can either fully segment
      the packet, or segment the first MTU and pass the rest to the hardware for
      further segmentation.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      576a30eb
  21. 26 6月, 2006 1 次提交