1. 06 7月, 2007 3 次提交
  2. 29 6月, 2007 1 次提交
  3. 27 6月, 2007 1 次提交
  4. 24 6月, 2007 3 次提交
  5. 08 6月, 2007 4 次提交
  6. 04 6月, 2007 1 次提交
    • H
      [NET] gso: Fix GSO feature mask in sk_setup_caps · 4fcd6b99
      Herbert Xu 提交于
      This isn't a bug just yet as only TCP uses sk_setup_caps for GSO.
      However, if and when UDP or something else starts using it this is
      likely to cause a problem if we forget to add software emulation
      for it at the same time.
      
      The problem is that right now we translate GSO emulation to the
      bitmask NETIF_F_GSO_MASK, which includes every protocol, even
      ones that we cannot emulate.
      
      This patch makes it provide only the ones that we can emulate.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4fcd6b99
  7. 31 5月, 2007 2 次提交
  8. 25 5月, 2007 2 次提交
    • D
      [XFRM]: Allow packet drops during larval state resolution. · 14e50e57
      David S. Miller 提交于
      The current IPSEC rule resolution behavior we have does not work for a
      lot of people, even though technically it's an improvement from the
      -EAGAIN buisness we had before.
      
      Right now we'll block until the key manager resolves the route.  That
      works for simple cases, but many folks would rather packets get
      silently dropped until the key manager resolves the IPSEC rules.
      
      We can't tell these folks to "set the socket non-blocking" because
      they don't have control over the non-block setting of things like the
      sockets used to resolve DNS deep inside of the resolver libraries in
      libc.
      
      With that in mind I coded up the patch below with some help from
      Herbert Xu which provides packet-drop behavior during larval state
      resolution, controllable via sysctl and off by default.
      
      This lays the framework to either:
      
      1) Make this default at some point or...
      
      2) Move this logic into xfrm{4,6}_policy.c and implement the
         ARP-like resolution queue we've all been dreaming of.
         The idea would be to queue packets to the policy, then
         once the larval state is resolved by the key manager we
         re-resolve the route and push the packets out.  The
         packets would timeout if the rule didn't get resolved
         in a certain amount of time.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      14e50e57
    • V
      [NET]: "wrong timeout value" in sk_wait_data() v2 · ba78073e
      Vasily Averin 提交于
      sys_setsockopt() do not check properly timeout values for
      SO_RCVTIMEO/SO_SNDTIMEO, for example it's possible to set negative timeout
      values. POSIX do not defines behaviour for sys_setsockopt in case negative
      timeouts, but requires that setsockopt() shall fail with -EDOM if the send and
      receive timeout values are too big to fit into the timeout fields in the socket
      structure.
      In current implementation negative timeout can lead to error messages like
      "schedule_timeout: wrong timeout value".
      
      Proposed patch:
      - checks tv_usec and returns -EDOM if it is wrong
      - do not allows to set negative timeout values (sets 0 instead) and outputs
      ratelimited information message about such attempts.
      Signed-off-By: NVasily Averin <vvs@sw.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ba78073e
  9. 23 5月, 2007 2 次提交
  10. 20 5月, 2007 2 次提交
    • S
      [NET]: Fix race condition about network device name allocation. · 9093bbb2
      Stephen Hemminger 提交于
      Kenji Kaneshige found this race between device removal and
      registration.  On unregister it is possible for the old device to
      exist, because sysfs file is still open.  A new device with 'eth%d'
      will select the same name, but sysfs kobject register will fial.
      
      The following changes the shutdown order slightly. It hold a removes
      the sysfs entries earlier (on unregister_netdevice), but holds a
      kobject reference.  Then when todo runs the actual last put free
      happens.
      Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9093bbb2
    • M
      [NET]: Fix net/core/skbuff.c gcc-3.2.3 compilation error · b6ccc67d
      Mikael Pettersson 提交于
      Compiling 2.6.22-rc1 with gcc-3.2.3 for i486 fails with:
      
        gcc -m32 -Wp,-MD,net/core/.skbuff.o.d  -nostdinc -isystem /home/mikpe/pkgs/linux-x86/gnu/lib/gcc-lib/i486-pc-linux-gnu/3.2.3/include -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O2 -pipe -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=4  -march=i486 -ffreestanding -maccumulate-outgoing-args -DCONFIG_AS_CFI=1  -Iinclude/asm-i386/mach-default -fomit-frame-pointer       -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(skbuff)"  -D"KBUILD_MODNAME=KBUILD_STR(skbuff)" -c -o net/core/skbuff.o net/core/skbuff.c
      net/core/skbuff.c:648:1: directives may not be used inside a macro argument
      net/core/skbuff.c:647:39: unterminated argument list invoking macro "memcpy"
      net/core/skbuff.c: In function `pskb_expand_head':
      net/core/skbuff.c:651: `memcpy' undeclared (first use in this function)
      net/core/skbuff.c:651: (Each undeclared identifier is reported only once
      net/core/skbuff.c:651: for each function it appears in.)
      net/core/skbuff.c:651: syntax error before "skb"
      make[2]: *** [net/core/skbuff.o] Error 1
      make[1]: *** [net/core] Error 2
      make: *** [net] Error 2
      
      The patch below implements a simple workaround which is to
      clone the offending memcpy() call and specialise it for the
      two different scenarios.
      
      Other workarounds are of course possible: e.g. bind the varying
      parameter in a local variable, or use a macro or inline function
      to perform the varying computation.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b6ccc67d
  11. 18 5月, 2007 1 次提交
  12. 11 5月, 2007 4 次提交
  13. 10 5月, 2007 1 次提交
    • R
      Add suspend-related notifications for CPU hotplug · 8bb78442
      Rafael J. Wysocki 提交于
      Since nonboot CPUs are now disabled after tasks and devices have been
      frozen and the CPU hotplug infrastructure is used for this purpose, we need
      special CPU hotplug notifications that will help the CPU-hotplug-aware
      subsystems distinguish normal CPU hotplug events from CPU hotplug events
      related to a system-wide suspend or resume operation in progress.  This
      patch introduces such notifications and causes them to be used during
      suspend and resume transitions.  It also changes all of the
      CPU-hotplug-aware subsystems to take these notifications into consideration
      (for now they are handled in the same way as the corresponding "normal"
      ones).
      
      [oleg@tv-sign.ru: cleanups]
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Gautham R Shenoy <ego@in.ibm.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8bb78442
  14. 09 5月, 2007 1 次提交
  15. 07 5月, 2007 1 次提交
  16. 04 5月, 2007 1 次提交
  17. 03 5月, 2007 1 次提交
  18. 29 4月, 2007 1 次提交
  19. 28 4月, 2007 3 次提交
  20. 27 4月, 2007 3 次提交
  21. 26 4月, 2007 2 次提交
    • A
      [NETLINK]: Possible cleanups. · 42bad1da
      Adrian Bunk 提交于
      - make the following needlessly global variables static:
        - core/rtnetlink.c: struct rtnl_msg_handlers[]
        - netfilter/nf_conntrack_proto.c: struct nf_ct_protos[]
      - make the following needlessly global functions static:
        - core/rtnetlink.c: rtnl_dump_all()
        - netlink/af_netlink.c: netlink_queue_skip()
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      42bad1da
    • J
      [NET]: Clean up sk_buff walkers. · eefa3906
      Jean Delvare 提交于
      I noticed recently that, in skb_checksum(), "offset" and "start" are
      essentially the same thing and have the same value throughout the
      function, despite being computed differently. Using a single variable
      allows some cleanups and makes the skb_checksum() function smaller,
      more readable, and presumably marginally faster.
      
      We appear to have many other "sk_buff walker" functions built on the
      exact same model, so the cleanup applies to them, too. Here is a list
      of the functions I found to be affected:
      
      net/appletalk/ddp.c:atalk_sum_skb()
      net/core/datagram.c:skb_copy_datagram_iovec()
      net/core/datagram.c:skb_copy_and_csum_datagram()
      net/core/skbuff.c:skb_copy_bits()
      net/core/skbuff.c:skb_store_bits()
      net/core/skbuff.c:skb_checksum()
      net/core/skbuff.c:skb_copy_and_csum_bit()
      net/core/user_dma.c:dma_skb_copy_datagram_iovec()
      net/xfrm/xfrm_algo.c:skb_icv_walk()
      net/xfrm/xfrm_algo.c:skb_to_sgvec()
      
      OTOH, I admit I'm a bit surprised, the cleanup is rather obvious so I'm
      really wondering if I am missing something. Can anyone please comment
      on this?
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eefa3906