31 Dec, 2011

1 commit


23 Dec, 2011

2 commits

  • skb->truesize might be big even for a small packet.

    Its even bigger after commit 87fb4b7b533 (net: more accurate skb
    truesize) and big MTU.

    We should allow queueing at least one packet per receiver, even with a
    low RCVBUF setting.

    Reported-by: Michal Simek
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Chris Boot reported crashes occurring in ipv6_select_ident().

    [ 461.457562] RIP: 0010:[] []
    ipv6_select_ident+0x31/0xa7

    [ 461.578229] Call Trace:
    [ 461.580742]
    [ 461.582870] [] ? udp6_ufo_fragment+0x124/0x1a2
    [ 461.589054] [] ? ipv6_gso_segment+0xc0/0x155
    [ 461.595140] [] ? skb_gso_segment+0x208/0x28b
    [ 461.601198] [] ? ipv6_confirm+0x146/0x15e
    [nf_conntrack_ipv6]
    [ 461.608786] [] ? nf_iterate+0x41/0x77
    [ 461.614227] [] ? dev_hard_start_xmit+0x357/0x543
    [ 461.620659] [] ? nf_hook_slow+0x73/0x111
    [ 461.626440] [] ? br_parse_ip_options+0x19a/0x19a
    [bridge]
    [ 461.633581] [] ? dev_queue_xmit+0x3af/0x459
    [ 461.639577] [] ? br_dev_queue_push_xmit+0x72/0x76
    [bridge]
    [ 461.646887] [] ? br_nf_post_routing+0x17d/0x18f
    [bridge]
    [ 461.653997] [] ? nf_iterate+0x41/0x77
    [ 461.659473] [] ? br_flood+0xfa/0xfa [bridge]
    [ 461.665485] [] ? nf_hook_slow+0x73/0x111
    [ 461.671234] [] ? br_flood+0xfa/0xfa [bridge]
    [ 461.677299] [] ?
    nf_bridge_update_protocol+0x20/0x20 [bridge]
    [ 461.684891] [] ? nf_ct_zone+0xa/0x17 [nf_conntrack]
    [ 461.691520] [] ? br_flood+0xfa/0xfa [bridge]
    [ 461.697572] [] ? NF_HOOK.constprop.8+0x3c/0x56
    [bridge]
    [ 461.704616] [] ?
    nf_bridge_push_encap_header+0x1c/0x26 [bridge]
    [ 461.712329] [] ? br_nf_forward_finish+0x8a/0x95
    [bridge]
    [ 461.719490] [] ?
    nf_bridge_pull_encap_header+0x1c/0x27 [bridge]
    [ 461.727223] [] ? br_nf_forward_ip+0x1c0/0x1d4 [bridge]
    [ 461.734292] [] ? nf_iterate+0x41/0x77
    [ 461.739758] [] ? __br_deliver+0xa0/0xa0 [bridge]
    [ 461.746203] [] ? nf_hook_slow+0x73/0x111
    [ 461.751950] [] ? __br_deliver+0xa0/0xa0 [bridge]
    [ 461.758378] [] ? NF_HOOK.constprop.4+0x56/0x56
    [bridge]

    This is caused by bridge netfilter special dst_entry (fake_rtable), a
    special shared entry, where attaching an inetpeer makes no sense.

    Problem is present since commit 87c48fa3b46 (ipv6: make fragment
    identifications less predictable)

    Introduce DST_NOPEER dst flag and make sure ipv6_select_ident() and
    __ip_select_ident() fallback to the 'no peer attached' handling.

    Reported-by: Chris Boot
    Tested-by: Chris Boot
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

22 Dec, 2011

1 commit

  • flow_cach_flush() might sleep but can be called from
    atomic context via the xfrm garbage collector. So add
    a flow_cache_flush_deferred() function and use this if
    the xfrm garbage colector is invoked from within the
    packet path.

    Signed-off-by: Steffen Klassert
    Acked-by: Timo Teräs
    Signed-off-by: David S. Miller

    Steffen Klassert
     

20 Dec, 2011

1 commit

  • Commit 8ffd3208 voids the previous patches f6778aab and 810c0719 for
    limiting the autoclose value. If userspace passes in -1 on 32-bit
    platform, the overflow check didn't work and autoclose would be set
    to 0xffffffff.

    This patch defines a max_autoclose (in seconds) for limiting the value
    and exposes it through sysctl, with the following intentions.

    1) Avoid overflowing autoclose * HZ.

    2) Keep the default autoclose bound consistent across 32- and 64-bit
    platforms (INT_MAX / HZ in this patch).

    3) Keep the autoclose value consistent between setsockopt() and
    getsockopt() calls.

    Suggested-by: Vlad Yasevich
    Signed-off-by: Xi Wang
    Signed-off-by: David S. Miller

    Xi Wang
     

01 Dec, 2011

1 commit

  • Since commit a4a710c4a7490587 (pkt_sched: Change PSCHED_SHIFT from 10 to
    6) it seems RED/GRED are broken.

    red_calc_qavg_from_idle_time() computes a delay in us units, but this
    delay is now 16 times bigger than real delay, so the final qavg result
    smaller than expected.

    Use standard kernel time services since there is no need to obfuscate
    them.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

29 Nov, 2011

1 commit


27 Nov, 2011

4 commits


24 Nov, 2011

1 commit

  • We can not update iph->daddr in ip_options_rcv_srr(), It is too early.
    When some exception ocurred later (eg. in ip_forward() when goto
    sr_failed) we need the ip header be identical to the original one as
    ICMP need it.

    Add a field 'nexthop' in struct ip_options to save nexthop of LSRR
    or SSRR option.

    Signed-off-by: Li Wei
    Signed-off-by: David S. Miller

    Li Wei
     

22 Nov, 2011

1 commit

  • This patch fixes an oops that can be triggered following this recipe:

    0) make sure nf_conntrack_netlink and nf_conntrack_ipv4 are loaded.
    1) container is started.
    2) connect to it via lxc-console.
    3) generate some traffic with the container to create some conntrack
    entries in its table.
    4) stop the container: you hit one oops because the conntrack table
    cleanup tries to report the destroy event to user-space but the
    per-netns nfnetlink socket has already gone (as the nfnetlink
    socket is per-netns but event callback registration is global).

    To fix this situation, we make the ctnl_notifier per-netns so the
    callback is registered/unregistered if the container is
    created/destroyed.

    Alex Bligh and Alexey Dobriyan originally proposed one small patch to
    check if the nfnetlink socket is gone in nfnetlink_has_listeners,
    but this is a very visited path for events, thus, it may reduce
    performance and it looks a bit hackish to check for the nfnetlink
    socket only to workaround this situation. As a result, I decided
    to follow the bigger path choice, which seems to look nicer to me.

    Cc: Alexey Dobriyan
    Reported-by: Alex Bligh
    Signed-off-by: Pablo Neira Ayuso

    Pablo Neira Ayuso
     

10 Nov, 2011

2 commits


09 Nov, 2011

2 commits


08 Nov, 2011

2 commits

  • Timers set by __set_chan_timer() should use miliseconds instead of
    jiffies. Commit 942ecc9c4643db5ce071562e0a23f99464d6b461 updated
    l2cap_set_timer() so it expects timeout to be specified in msecs
    instead of jiffies. This makes timeouts unreliable when CONFIG_HZ
    is not set to 1000.

    Signed-off-by: Andrzej Kaczmarek
    Signed-off-by: Gustavo F. Padovan

    Andrzej Kaczmarek
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (47 commits)
    forcedeth: fix a few sparse warnings (variable shadowing)
    forcedeth: Improve stats counters
    forcedeth: remove unneeded stats updates
    forcedeth: Acknowledge only interrupts that are being processed
    forcedeth: fix race when unloading module
    MAINTAINERS/rds: update maintainer
    wanrouter: Remove kernel_lock annotations
    usbnet: fix oops in usbnet_start_xmit
    ixgbe: Fix compile for kernel without CONFIG_PCI_IOV defined
    etherh: Add MAINTAINERS entry for etherh
    bonding: comparing a u8 with -1 is always false
    sky2: fix regression on Yukon Optima
    netlink: clarify attribute length check documentation
    netlink: validate NLA_MSECS length
    i825xx:xscale:8390:freescale: Fix Kconfig dependancies
    macvlan: receive multicast with local address
    tg3: Update version to 3.121
    tg3: Eliminate timer race with reset_task
    tg3: Schedule at most one tg3_reset_task run
    tg3: Obtain PCI function number from device
    ...

    Linus Torvalds
     

07 Nov, 2011

1 commit

  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     

05 Nov, 2011

3 commits


03 Nov, 2011

1 commit


02 Nov, 2011

1 commit

  • the tcp and udp code creates a set of struct file_operations at runtime
    while it can also be done at compile time, with the added benefit of then
    having these file operations be const.

    the trickiest part was to get the "THIS_MODULE" reference right; the naive
    method of declaring a struct in the place of registration would not work
    for this reason.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: David S. Miller

    Arjan van de Ven
     

01 Nov, 2011

11 commits

  • This is to address the following error during the compilation:

    In file included from kernel/sysctl_binary.c:6:
    include/net/ip_vs.h:1406: error: expected identifier or ‘(’ before ‘{’ token
    make[1]: *** [kernel/sysctl_binary.o] Error 1
    make[1]: *** Waiting for unfinished jobs....

    That manifests itself when CONFIG_IP_VS_NFCT is undefined in .config file.

    Signed-off-by: Krzysztof Wilczynski
    Signed-off-by: Simon Horman

    Krzysztof Wilczynski
     
  • This patch exports several definitions that used to live under
    include/net/netfilter/nf_nat.h. These definitions, although not
    exported, have been used by iptables and other userspace
    applications like miniupnpd since long time. Basically, these
    userspace tools included some internal definition of the required
    structures and they assume no changes in the binary representation
    (which is OK indeed).

    To resolve this situation, this patch makes public the required
    structure and install them in INSTALL_HDR_PATH.

    See: https://bugs.gentoo.org/376873, for more information.

    This patch is heavily based on the initial patch sent by:

    Anthony G. Basile

    Which was entitled:

    netfilter: export sanitized nf_nat.h to INSTALL_HDR_PATH

    Signed-off-by: Pablo Neira Ayuso

    Pablo Neira Ayuso
     
  • Acked-by: Julian Anastasov
    Acked-by Hans Schillstrom
    Signed-off-by: Simon Horman
    Signed-off-by: Pablo Neira Ayuso

    Simon Horman
     
  • Acked-by: Julian Anastasov
    Acked-by Hans Schillstrom
    Signed-off-by: Simon Horman
    Signed-off-by: Pablo Neira Ayuso

    Simon Horman
     
  • Standardize the style for compiler based printf format verification.
    Standardized the location of __printf too.

    Done via script and a little typing.

    $ grep -rPl --include=*.[ch] -w "__attribute__" * | \
    grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
    xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

    [akpm@linux-foundation.org: revert arch bits]
    Signed-off-by: Joe Perches
    Cc: "Kirill A. Shutemov"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • These two small inlines make calls to try_module_get() and
    module_put() which would force us to keep module.h present
    within yet another common include header. We can avoid this
    by turning them into macros. The hci_dev_hold construct
    is patterned off of raw_spin_trylock_irqsave() in spinlock.h

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • This file was using the module get/put functions in two simple inline
    functions. But module_get/put were only within scope because of
    the implicit presence of module.h being everywhere.

    Rather than add module.h to another file in include/ -- which is
    exactly the thing we are trying to avoid, simply convert these
    one-line functions into a define, as per what was done for the
    device_schedule_callback() in commit 523ded71de0c5e669733.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • The implicit presence of module.h everywhere meant that this header
    also was getting moduleparam.h which defines struct kernel_param.

    Since it only needs to know that kernel_param is a struct, call that
    out instead of adding an include of moduleparam.h -- to get rid of this:

    include/net/netfilter/nf_conntrack.h:316: warning: 'struct kernel_param' declared inside parameter list
    include/net/netfilter/nf_conntrack.h:316: warning: its scope is only this definition or declaration, which is probably not what you want

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • The pretty much brings in the kitchen sink along
    with it, so it should be avoided wherever reasonably possible in
    terms of being included from other commonly used
    files, as it results in a measureable increase on compile times.

    The worst culprit was probably device.h since it is used everywhere.
    This file also had an implicit dependency/usage of mutex.h which was
    masked by module.h, and is also fixed here at the same time.

    There are over a dozen other headers that simply declare the
    struct instead of pulling in the whole file, so follow their lead
    and simply make it a few more.

    Most of the implicit dependencies on module.h being present by
    these headers pulling it in have been now weeded out, so we can
    finally make this change with hopefully minimal breakage.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • This file has modular references, but they are limited to
    those which are covered by the simple "struct module;"
    declaration used in dozens of other places. In fact that
    declaration is already there (just outside of the context
    of this commit) so simply remove the include line.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • There is nothing module specific in this header, and removing
    it doesn't seem to uncover any implicit dependencies either.
    Must be simply a vestige of an ancient legacy.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

27 Oct, 2011

1 commit

  • commit 66b13d99d96a (ipv4: tcp: fix TOS value in ACK messages sent from
    TIME_WAIT) fixed IPv4 only.

    This part is for the IPv6 side, adding a tclass param to ip6_xmit()

    We alias tw_tclass and tw_tos, if socket family is INET6.

    [ if sockets is ipv4-mapped, only IP_TOS socket option is used to fill
    TOS field, TCLASS is not taken into account ]

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

26 Oct, 2011

1 commit

  • * 'for-linus' of git://github.com/ericvh/linux:
    9p: fix 9p.txt to advertise msize instead of maxdata
    net/9p: Convert net/9p protocol dumps to tracepoints
    fs/9p: change an int to unsigned int
    fs/9p: Cleanup option parsing in 9p
    9p: move dereference after NULL check
    fs/9p: inode file operation is properly initialized init_special_inode
    fs/9p: Update zero-copy implementation in 9p

    Linus Torvalds
     

25 Oct, 2011

2 commits