20 May, 2007

9 commits

  • 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: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     
  • When icmp_send is called on the local output path before the
    packet hits ip_output, skb->dev is not set, causing a crash
    when sysctl_icmp_errors_use_inbound_ifaddr is set. This can
    happen with the netfilter REJECT target or IPsec tunnels.

    Let routing decide the ICMP source address in that case, since the
    packet is locally generated there is no inbound interface and
    the sysctl should not apply.

    The option actually seems to be unfixable broken, on the path
    after ip_output() skb->dev points to the outgoing device and
    we don't know the incoming device anymore, so its going to do
    the absolute wrong thing and pick the address of the outgoing
    interface. Add a comment about this.

    Reported by Curtis Doty .

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • The option is named CONFIG_NF_NAT not CONFIG_IP_NF_NAT. Remove the ifdef
    completely since helpers also expect defragmented packet even without
    NAT.

    Noticed by Robert P. J. Day

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • When the helper module is removed for a master connection that has a
    fulfilled expectation, but has already timed out and got removed from
    the hash tables, nf_conntrack_helper_unregister can't find the master
    connection to unset the helper, causing a use-after-free when the
    expected connection is destroyed and releases the last reference to
    the master.

    The helper destroy callback was introduced for the PPtP helper to clean
    up expectations and expected connections when the master connection
    times out, but doing this from destroy_conntrack only works for
    unfulfilled expectations since expected connections hold a reference
    to the master, preventing its destruction. Move the destroy callback to
    the timeout function, which fixes both problems.

    Reported/tested by Gabor Burjan .

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • This is a natural extension of the changeset

    [XFRM]: Probe selected algorithm only.

    which only removed the probe call for xfrm_user. This patch does exactly
    the same thing for af_key. In other words, we load the algorithm requested
    by the user rather than everything when adding xfrm states in af_key.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • State could become inconsistent in two cases:

    1) Userspace disabled FRTO by tuning sysctl when one of the TCP
    flows was in the middle of FRTO algorithm (and then RTO is
    again triggered)

    2) SACK reneging occurs during FRTO algorithm

    A simple solution is just to abort the previous FRTO when such
    obscure condition occurs...

    Signed-off-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     
  • The conservative spurious RTO response did not queue CWR even
    though the sending rate was lowered. Whenever reduction happens
    regardless of reason, CWR should be sent (forgetting to send it
    is not very fatal though).

    A better approach would be to queue CWR when one of the sending
    rate reducing responses (rate-halving one or this conservative
    response) is used already at RTO. Doing that would allow CWR to
    be sent along with the two new data segments that are sent
    during FRTO. However, it's a bit "racy" because userland could
    tune the response sysctl to a more aggressive one in between.

    Signed-off-by: Ilpo Järvinen
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     
  • 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: Mikael Pettersson
    Signed-off-by: David S. Miller

    Mikael Pettersson
     
  • coverity has spotted a bug in rfkill.c (bug id #1627),
    in rfkill_allocate() NULL was returns if the kzalloc() works,
    and deref the NULL pointer if it fails,

    Signed-off-by: Ivo van Doorn
    Signed-off-by: David S. Miller

    Ivo van Doorn
     

18 May, 2007

7 commits


17 May, 2007

3 commits


15 May, 2007

2 commits


14 May, 2007

5 commits

  • This displays the statistics specified in the updated IP-MIB RFC
    (RFC4293) in /proc/net/netstat. The reason why these are not displayed
    in /proc/net/snmp is that some existing utilities are developed under
    the assumption which ipstat items in /proc/net/snmp is unchanged.

    Signed-off-by: Mitsuru Chinen
    Signed-off-by: YOSHIFUJI Hideaki
    Signed-off-by: David S. Miller

    Mitsuru Chinen
     
  • Reverse the sense of the promiscuous-mode tests in ip6_mc_input().

    Signed-off-by: Corey Mutter
    Signed-off-by: David L Stevens
    Signed-off-by: David S. Miller

    Corey Mutter
     
  • This fixes an out-of-boundary condition when the classified
    band equals q->bands. Caught by Alexey

    Signed-off-by: Jamal Hadi Salim
    Signed-off-by: David S. Miller

    Jamal Hadi Salim
     
  • Multi-page allocations are always likely to fail. Since such failures
    are expected and non-critical in xfrm_hash_alloc, we shouldn't warn about
    them.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • The function xfrm_policy_byid takes a dir argument but finds the policy
    using the index instead. We only use the dir argument to update the
    policy count for that direction. Since the user can supply any value
    for dir, this can corrupt our policy count.

    I know this is the problem because a few days ago I was deleting
    policies by hand using indicies and accidentally typed in the wrong
    direction. It still deleted the policy and at the time I thought
    that was cool. In retrospect it isn't such a good idea :)

    I decided against letting it delete the policy anyway just in case
    we ever remove the connection between indicies and direction.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

12 May, 2007

1 commit

  • * 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid:
    USB HID: hiddev - fix race between hiddev_send_event() and hiddev_release()
    HID: add hooks for getkeycode() and setkeycode() methods
    HID: switch to using input_dev->dev.parent
    USB HID: Logitech wheel 0x046d/0xc294 needs HID_QUIRK_NOGET quirk
    USB HID: usb_buffer_free() cleanup
    USB HID: report descriptor of Cypress USB barcode readers needs fixup
    Bluetooth HID: HIDP - don't initialize force feedback
    USB HID: update CONFIG_USB_HIDINPUT_POWERBOOK description
    HID: add input mappings for non-working keys on Logitech S510 remote

    Linus Torvalds
     

11 May, 2007

13 commits