08 Nov, 2011

2 commits

  • * 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
     
  • The BKL is gone, these annotations are useless.

    Signed-off-by: Richard Weinberger
    Signed-off-by: David S. Miller

    Richard Weinberger
     

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


04 Nov, 2011

4 commits

  • This popped some compiler errors due to mismatched prototypes. Just
    remove most manual inlines, the compiler should be able to figure out
    what makes sense to inline and not.

    net/packet/af_packet.c:252: warning: 'prb_curr_blk_in_use' declared inline after being called
    net/packet/af_packet.c:252: warning: previous declaration of 'prb_curr_blk_in_use' was here
    net/packet/af_packet.c:258: warning: 'prb_queue_frozen' declared inline after being called
    net/packet/af_packet.c:258: warning: previous declaration of 'prb_queue_frozen' was here
    net/packet/af_packet.c:248: warning: 'packet_previous_frame' declared inline after being called
    net/packet/af_packet.c:248: warning: previous declaration of 'packet_previous_frame' was here
    net/packet/af_packet.c:251: warning: 'packet_increment_head' declared inline after being called
    net/packet/af_packet.c:251: warning: previous declaration of 'packet_increment_head' was here

    Signed-off-by: Olof Johansson
    Cc: Chetan Loke
    Signed-off-by: David S. Miller

    Olof Johansson
     
  • Commit 87fb4b7b533073eeeaed0b6bf7c2328995f6c075 (net: more
    accurate skb truesize) changed the alignment of size. This
    can cause problems at least on some machines with NFS root:

    Unhandled fault: alignment exception (0x801) at 0xc183a43a
    Internal error: : 801 [#1] PREEMPT
    Modules linked in:
    CPU: 0 Not tainted (3.1.0-08784-g5eeee4a #733)
    pc : [] lr : [] psr: 60000013
    sp : c180fef8 ip : 00000000 fp : c181f580
    r10: 00000000 r9 : c044b28c r8 : 00000001
    r7 : c183a3a0 r6 : c1835be0 r5 : c183a412 r4 : 000001f2
    r3 : 00000000 r2 : 00000000 r1 : ffffffe6 r0 : c183a43a
    Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
    Control: 0005317f Table: 10004000 DAC: 00000017
    Process swapper (pid: 1, stack limit = 0xc180e270)
    Stack: (0xc180fef8 to 0xc1810000)
    fee0: 00000024 00000000
    ff00: 00000000 c183b9c0 c183b8e0 c044b28c c0507ccc c019dfc4 c180ff2c c0503cf8
    ff20: c180ff4c c180ff4c 00000000 c1835420 c182c740 c18349c0 c05233c0 00000000
    ff40: 00000000 c00e6bb8 c180e000 00000000 c04dd82c c0507e7c c050cc18 c183b9c0
    ff60: c05233c0 00000000 00000000 c01f34f4 c0430d70 c019d364 c04dd898 c04dd898
    ff80: c04dd82c c0507e7c c180e000 00000000 c04c584c c01f4918 c04dd898 c04dd82c
    ffa0: c04ddd28 c180e000 00000000 c0008758 c181fa60 3231d82c 00000037 00000000
    ffc0: 00000000 c04dd898 c04dd82c c04ddd28 00000013 00000000 00000000 00000000
    ffe0: 00000000 c04b2224 00000000 c04b21a0 c001056c c001056c 00000000 00000000
    Function entered at [] from []
    Function entered at [] from []
    Function entered at [] from []
    Function entered at [] from []
    Function entered at [] from []
    Function entered at [] from []
    Code: e1a00005 e3a01028 ebfa7cb0 e35a0000 (e5858028)

    Here PC is at __alloc_skb and &shinfo->dataref is unaligned because
    skb->end can be unaligned without this patch.

    As explained by Eric Dumazet , this happens
    only with SLOB, and not with SLAB or SLUB:

    * Eric Dumazet [111102 15:56]:
    >
    > Your patch is absolutely needed, I completely forgot about SLOB :(
    >
    > since, kmalloc(386) on SLOB gives exactly ksize=386 bytes, not nearest
    > power of two.
    >
    > [ 60.305763] malloc(size=385)->ffff880112c11e38 ksize=386 -> nsize=2
    > [ 60.305921] malloc(size=385)->ffff88007c92ce28 ksize=386 -> nsize=2
    > [ 60.306898] malloc(size=656)->ffff88007c44ad28 ksize=656 -> nsize=272
    > [ 60.325385] malloc(size=656)->ffff88007c575868 ksize=656 -> nsize=272
    > [ 60.325531] malloc(size=656)->ffff88011c777230 ksize=656 -> nsize=272
    > [ 60.325701] malloc(size=656)->ffff880114011008 ksize=656 -> nsize=272
    > [ 60.346716] malloc(size=385)->ffff880114142008 ksize=386 -> nsize=2
    > [ 60.346900] malloc(size=385)->ffff88011c777690 ksize=386 -> nsize=2

    Signed-off-by: Tony Lindgren
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Tony Lindgren
     
  • Simon Kirby reported lockdep warnings and following messages :

    [104661.897577] huh, entered softirq 3 NET_RX ffffffff81613740
    preempt_count 00000101, exited with 00000102?

    [104661.923653] huh, entered softirq 3 NET_RX ffffffff81613740
    preempt_count 00000101, exited with 00000102?

    Problem comes from commit 0e734419
    (ipv4: Use inet_csk_route_child_sock() in DCCP and TCP.)

    If inet_csk_route_child_sock() returns NULL, we should release socket
    lock before freeing it.

    Another lock imbalance exists if __inet_inherit_port() returns an error
    since commit 093d282321da ( tproxy: fix hash locking issue when using
    port redirection in __inet_inherit_port()) a backport is also needed for
    >= 2.6.37 kernels.

    Reported-by: Simon Kirby
    Signed-off-by: Eric Dumazet
    Tested-by: Eric Dumazet
    CC: Balazs Scheidler
    CC: KOVACS Krisztian
    Reviewed-by: Thomas Gleixner
    Tested-by: Simon Kirby
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Misha Labjuk reported panics occurring in l2tp_recv_dequeue()

    If we release reorder_q.lock, we must not keep a dangling pointer (tmp),
    since another thread could manipulate reorder_q.

    Instead we must restart the scan at beginning of list.

    Reported-by: Misha Labjuk
    Tested-by: Misha Labjuk
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

03 Nov, 2011

6 commits


02 Nov, 2011

5 commits

  • udp_queue_rcv_skb() has a possible race in encap_rcv handling, since
    this pointer can be changed anytime.

    We should use ACCESS_ONCE() to close the race.

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

    Eric Dumazet
     
  • commit cb101ed2 in 3.0 introduced a bug in x25_recvmsg()
    When passed bogus junk from userspace, x25->neighbour can be NULL,
    as shown in this oops..

    BUG: unable to handle kernel NULL pointer dereference at 000000000000001c
    IP: [] x25_recvmsg+0x4d/0x280 [x25]
    PGD 1015f3067 PUD 105072067 PMD 0
    Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
    CPU 0
    Pid: 27928, comm: iknowthis Not tainted 3.1.0+ #2 Gigabyte Technology Co., Ltd. GA-MA78GM-S2H/GA-MA78GM-S2H
    RIP: 0010:[] [] x25_recvmsg+0x4d/0x280 [x25]
    RSP: 0018:ffff88010c0b7cc8 EFLAGS: 00010282
    RAX: 0000000000000000 RBX: ffff88010c0b7d78 RCX: 0000000000000c02
    RDX: ffff88010c0b7d78 RSI: ffff88011c93dc00 RDI: ffff880103f667b0
    RBP: ffff88010c0b7d18 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000000 R12: ffff880103f667b0
    R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
    FS: 00007f479ce7f700(0000) GS:ffff88012a600000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: 000000000000001c CR3: 000000010529e000 CR4: 00000000000006f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process iknowthis (pid: 27928, threadinfo ffff88010c0b6000, task ffff880103faa4f0)
    Stack:
    0000000000000c02 0000000000000c02 ffff88010c0b7d18 ffffff958153cb37
    ffffffff8153cb60 0000000000000c02 ffff88011c93dc00 0000000000000000
    0000000000000c02 ffff88010c0b7e10 ffff88010c0b7de8 ffffffff815372c2
    Call Trace:
    [] ? sock_update_classid+0xb0/0x180
    [] sock_aio_read.part.10+0x142/0x150
    [] ? inode_has_perm+0x62/0xa0
    [] sock_aio_read+0x2d/0x40
    [] do_sync_read+0xd2/0x110
    [] ? security_file_permission+0x96/0xb0
    [] ? rw_verify_area+0x61/0x100
    [] vfs_read+0x16d/0x180
    [] sys_read+0x4d/0x90
    [] system_call_fastpath+0x16/0x1b
    Code: 8b 66 20 4c 8b 32 48 89 d3 48 89 4d b8 45 89 c7 c7 45 cc 95 ff ff ff 4d 85 e4 0f 84 ed 01 00 00 49 8b 84 24 18 05 00 00 4c 89 e7
    78 1c 01 45 19 ed 31 f6 e8 d5 37 ff e0 41 0f b6 44 24 0e 41

    Signed-off-by: Dave Jones
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Dave Jones
     
  • 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
     
  • When (de)configuring a vlan interface, the IFF_ALLMULTI ans IFF_PROMISC
    flags are cleared or set on the underlying interface. So, if these flags
    are changed on a vlan interface that is not up, the flags underlying
    interface might be set or cleared twice.

    Only propagating flag changes when a device is up makes sure this does
    not happen. It also makes sure that an underlying device is not set to
    promiscuous or allmulti mode for a vlan device that is down.

    Signed-off-by: Matthijs Kooijman
    Signed-off-by: David S. Miller

    Matthijs Kooijman
     
  • Whatever situations make this state legitimate when SMP
    also would be legitimate when !SMP and f.e. preemption is
    enabled.

    This is dubious enough that we should just delete it entirely. If we
    want to add debugging for neigh timer races, better more thorough
    mechanisms are needed.

    Signed-off-by: David S. Miller

    David S. Miller
     

01 Nov, 2011

16 commits

  • commit f15850861860636c905b33a9a5be3dcbc2b0d56a
    (netfilter: nfnetlink_queue: return error number to caller)
    erronously assigns the return value of nf_queue() to the "ret" value.

    This can cause bogus return values if we encounter QUEUE verdict
    when bypassing is enabled, the listener does not exist and the
    next hook returns NF_STOLEN.

    In this case nf_hook_slow returned -ESRCH instead of 0.

    Signed-off-by: Florian Westphal
    Signed-off-by: Pablo Neira Ayuso

    Florian Westphal
     
  • Several callers (h323 conntrack, xt_addrtype) assume that the
    returned **dst only needs to be released if the function returns 0.

    This is true for the ipv4 implementation, but not for the ipv6 one.

    Instead of changing the users, change the ipv6 implementation
    to behave like the ipv4 version by only providing the dst_entry result
    in the success case.

    Signed-off-by: Florian Westphal
    Signed-off-by: Pablo Neira Ayuso

    Florian Westphal
     
  • This is to address the following warning during compilation time:

    net/netfilter/ipvs/ip_vs_core.c: In function ‘ip_vs_leave’:
    net/netfilter/ipvs/ip_vs_core.c:532: warning: unused variable ‘cs’

    This variable is indeed no longer in use.

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

    Krzysztof Wilczynski
     
  • Site specific OOM messages are duplications of a generic MM
    out of memory message and aren't really useful, so just
    delete them.

    Signed-off-by: Joe Perches
    Signed-off-by: Patrick McHardy
    Signed-off-by: Pablo Neira Ayuso

    Joe Perches
     
  • ipvs is not used in ip_vs_genl_set_cmd() or ip_vs_genl_get_cmd()

    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
     
  • Acked-by: Julian Anastasov
    Acked-by Hans Schillstrom
    Signed-off-by: Simon Horman
    Signed-off-by: Pablo Neira Ayuso

    Simon Horman
     
  • This is to expose "ports" parameter via sysfs so it can be read
    at any time in order to determine what port or ports were passed
    to the module at the point when it was loaded.

    Signed-off-by: Krzysztof Wilczynski
    Signed-off-by: Simon Horman
    Signed-off-by: Pablo Neira Ayuso

    Krzysztof Wilczynski
     
  • 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
     
  • To fix this, once the implicit presence of module.h is removed:

    net/bridge/br_stp_if.c: In function ‘br_stp_start’:
    net/bridge/br_stp_if.c:131: error: implicit declaration of function ‘call_usermodehelper’
    net/bridge/br_stp_if.c:131: error: ‘UMH_WAIT_PROC’ undeclared (first use in this function)

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • These files are non modular, but need to export symbols using
    the macros now living in export.h -- call out the include so
    that things won't break when we remove the implicit presence
    of module.h from everywhere.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • These files were getting access to these two via the implicit
    presence of module.h everywhere. They aren't modules, so they
    don't need the full module.h inclusion though.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • With calls to modular infrastructure, these files really
    needs the full module.h header. Call it out so some of the
    cleanups of implicit and unrequired includes elsewhere can be
    cleaned up.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits)
    vlan: allow nested vlan_do_receive()
    ipv6: fix route lookup in addrconf_prefix_rcv()
    bonding: eliminate bond_close race conditions
    qlcnic: fix beacon and LED test.
    qlcnic: Updated License file
    qlcnic: updated reset sequence
    qlcnic: reset loopback mode if promiscous mode setting fails.
    qlcnic: skip IDC ack check in fw reset path.
    i825xx: Fix incorrect dependency for BVME6000_NET
    ipv6: fix route error binding peer in func icmp6_dst_alloc
    ipv6: fix error propagation in ip6_ufo_append_data()
    stmmac: update normal descriptor structure (v2)
    stmmac: fix NULL pointer dereference in capabilities fixup (v2)
    stmmac: fix a bug while checking the HW cap reg (v2)
    be2net: Changing MAC Address of a VF was broken.
    be2net: Refactored be_cmds.c file.
    bnx2x: update driver version to 1.70.30-0
    bnx2x: use FW 7.0.29.0
    bnx2x: Enable changing speed when port type is PORT_DA
    bnx2x: Fix 54618se LED behavior
    ...

    Linus Torvalds
     
  • The HCI_MGMT flag should only be set when user space requests the full
    controller information. This way we avoid potential issues with setting
    change events ariving before the actual read_controller_info command
    finishes.

    Signed-off-by: Johan Hedberg
    Signed-off-by: Gustavo F. Padovan

    Johan Hedberg
     
  • I've noticed that my CSR usb dongle was not working if it was plugged in when
    PC was booting. It looks like I get two HCI reset command complete events (see
    hcidump logs below).
    The root cause is reset called from off_timer. Timeout for this reset to
    complete is set to 250ms and my bt dongle requires more time for replying with
    command complete event. After that, chip seems to reply with reset command
    complete event for next non-reset command.

    Attached patch increase mentioned timeout to HCI_INIT_TIMEOUT, this value is
    already used for timeouting hci_reset_req in hci_dev_reset().

    This might also be related to BT not working after suspend that was reported
    here some time ago.

    Hcidump log:

    2011-09-12 23:13:27.379465 < HCI Command: Reset (0x03|0x0003) plen 0
    2011-09-12 23:13:27.380797 > HCI Event: Command Complete (0x0e) plen 4
    Reset (0x03|0x0003) ncmd 1
    status 0x00
    2011-09-12 23:13:27.380859 < HCI Command: Read Local Supported Features (0x04|0x000
    3) plen 0
    2011-09-12 23:13:27.760789 > HCI Event: Command Complete (0x0e) plen 4
    Reset (0x03|0x0003) ncmd 1
    status 0x00
    2011-09-12 23:13:27.760831 < HCI Command: Read Local Version Information (0x04|0x00
    01) plen 0
    2011-09-12 23:13:27.764780 > HCI Event: Command Complete (0x0e) plen 12
    Read Local Version Information (0x04|0x0001) ncmd 1
    status 0x00
    HCI Version: 1.1 (0x1) HCI Revision: 0x36f
    LMP Version: 1.1 (0x1) LMP Subversion: 0x36f
    Manufacturer: Cambridge Silicon Radio (10)

    Signed-off-by: Szymon Janc
    Signed-off-by: Gustavo F. Padovan

    Szymon Janc
     

30 Oct, 2011

3 commits