11 Feb, 2013

4 commits

  • Initial implementation of the Multiple VLAN Registration Protocol
    (MVRP) from IEEE 802.1Q-2011, based on the existing implementation
    of the GARP VLAN Registration Protocol (GVRP).

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

    David Ward
     
  • Initial implementation of the Multiple Registration Protocol (MRP)
    from IEEE 802.1Q-2011, based on the existing implementation of the
    Generic Attribute Registration Protocol (GARP).

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

    David Ward
     
  • Andy King says:

    ====================
    In an effort to improve the out-of-the-box experience with Linux kernels for
    VMware users, VMware is working on readying the VM Sockets (VSOCK, formerly
    VMCI Sockets) (vsock) kernel module for inclusion in the Linux kernel. The
    purpose of this post is to acquire feedback on the vsock kernel module.

    Unlike previous submissions, where the new socket family was entirely reliant
    on VMware's VMCI PCI device (and thus VMware's hypervisor), VM Sockets is now
    completely[1] separated out into two parts, each in its own module:

    o Core socket code, which is transport-neutral and invokes transport
    callbacks to communicate with the hypervisor. This is vsock.ko.
    o A VMCI transport, which communicates over VMCI with the VMware hypervisor.
    This is vmw_vsock_vmci_transport.ko, and it registers with the core module
    as a transport.

    This should provide a path to introducing additional transports, for example
    virtio, with the ultimate goal being to make this new socket family
    hypervisor-neutral.

    [1] If Gerd tries it and determines this to be false (still), I'll ship him
    a keg of beer.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • VM Sockets allows communication between virtual machines and the hypervisor.
    User level applications both in a virtual machine and on the host can use the
    VM Sockets API, which facilitates fast and efficient communication between
    guest virtual machines and their host. A socket address family, designed to be
    compatible with UDP and TCP at the interface level, is provided.

    Today, VM Sockets is used by various VMware Tools components inside the guest
    for zero-config, network-less access to VMware host services. In addition to
    this, VMware's users are using VM Sockets for various applications, where
    network access of the virtual machine is restricted or non-existent. Examples
    of this are VMs communicating with device proxies for proprietary hardware
    running as host applications and automated testing of applications running
    within virtual machines.

    The VMware VM Sockets are similar to other socket types, like Berkeley UNIX
    socket interface. The VM Sockets module supports both connection-oriented
    stream sockets like TCP, and connectionless datagram sockets like UDP. The VM
    Sockets protocol family is defined as "AF_VSOCK" and the socket operations
    split for SOCK_DGRAM and SOCK_STREAM.

    For additional information about the use of VM Sockets, please refer to the
    VM Sockets Programming Guide available at:

    https://www.vmware.com/support/developer/vmci-sdk/

    Signed-off-by: George Zhang
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Andy king
    Signed-off-by: David S. Miller

    Andy King
     

09 Feb, 2013

19 commits

  • Synchronize with 'net' in order to sort out some l2tp, wireless, and
    ipv6 GRE fixes that will be built on top of in 'net-next'.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This was preventing GRO and RxCheckSum offload to happen.

    Signed-off-by: Jay Hernandez
    Signed-off-by: Vipul Pandya
    Signed-off-by: David S. Miller

    Vipul Pandya
     
  • In sctp_auth_make_key_vector, we allocate a temporary sctp_auth_bytes
    structure with kmalloc instead of the sctp_auth_create_key allocator.
    Change this to sctp_auth_create_key as it is the case everywhere else,
    so that we also can properly free it via sctp_auth_key_put. This makes
    it easier for future code changes in the structure and allocator itself,
    since a single API is consistently used for this purpose. Also, by
    using sctp_auth_create_key we're doing sanity checks over the arguments.

    Signed-off-by: Daniel Borkmann
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • Some multicast addresses are common to all macvlans,
    so if a multicast message has a hash value collision, we
    have to deliver a copy to all macvlans, adding significant
    latency and possible packet drops if netdev_max_backlog
    limit is hit.

    Having a per macvlan hash function permits to reduce the
    impact of hash collisions.

    Suggested-by: Maciej Żenczykowski
    Signed-off-by: Eric Dumazet
    Signed-off-by: Maciej Żenczykowski
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • commit cd431e738509e (macvlan: add multicast filter) forgot
    the broadcast case.

    Signed-off-by: Eric Dumazet
    Reported-by: Maciej Żenczykowski
    SIgned-off-by: Maciej Żenczykowski
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • This patch fixes the following RCU warning:

    [ 51.680236] ===============================
    [ 51.681914] [ INFO: suspicious RCU usage. ]
    [ 51.683610] 3.8.0-rc6-next-20130206-sasha-00028-g83214f7-dirty #276 Tainted: G W
    [ 51.686703] -------------------------------
    [ 51.688281] net/ipv6/ip6_flowlabel.c:671 suspicious rcu_dereference_check() usage!

    we should use rcu_dereference_bh() when we hold rcu_read_lock_bh().

    Reported-by: Sasha Levin
    Cc: David S. Miller
    Cc: YOSHIFUJI Hideaki
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Amerigo Wang
     
  • alloc failures already get standardized OOM
    messages and a dump_stack.

    For the affected mallocs around these OOM messages:

    Converted kmallocs with multiplies to kmalloc_array.
    Converted a kmalloc/memcpy to kmemdup.
    Removed now unused stack variables.
    Removed unnecessary parentheses.
    Neatened alignment.

    Signed-off-by: Joe Perches
    Acked-by: Arend van Spriel
    Acked-by: Marc Kleine-Budde
    Acked-by: John W. Linville
    Signed-off-by: David S. Miller

    Joe Perches
     
  • The last (bool) parameter in bgmac_cmdcfg_maskset says if the write
    should be made, even if value didn't change. Currently driver doesn't
    match the specs about (not) forcing some changes. This makes it follow
    them.

    Reported-by: Nathan Hintz
    Signed-off-by: Rafał Miłecki
    Signed-off-by: David S. Miller

    Rafał Miłecki
     
  • This adds check for a valid Ethernet MAC address and in case it is not,
    it will generate a valid random one, such that the adapter is still
    usable.

    Signed-off-by: Rafał Miłecki
    Signed-off-by: David S. Miller

    Rafał Miłecki
     
  • In order to address the fact that some devices cannot support the full 32K
    frag size we need to have the value accessible somewhere so that we can use it
    to do comparisons against what the device can support. As such I am moving
    the values out of skbuff.c and into skbuff.h.

    Signed-off-by: Alexander Duyck
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • Linus Torvalds
     
  • Pull ARM fixes from Russell King:
    "I was going to hold these off until v3.8 was out, and send them with a
    stable tag, but as everyone else is pushing much bigger fixes which
    Linus is accepting, let's save people from the hastle of having to
    patch v3.8 back into working or use a stable kernel.

    Looking at the diffstat, this really is high value for its size; this
    is miniscule compared to how the -rc6 to tip diffstat currently looks.

    So, four patches in this set:
    - Punit Agrawal reports that the kernel no longer boots on MPCore due
    to a new assumption made in the GIC code which isn't true of
    earlier GIC designs. This is the biggest change in this set.
    - Punit's boot log also revealed a bunch of WARN_ON() dumps caused by
    the DT-ification of the GIC support without fixing up non-DT
    Realview - which now sees a greater number of interrupts than it
    did before.
    - A fix for the DMA coherent code from Marek which uses the wrong
    check for atomic allocations; this can result in spinlock lockups
    or other nasty effects.
    - A fix from Will, which will affect all Android based platforms if
    not applied (which use the 2G:2G VM split) - this causes
    particularly 'make' to misbehave unless this bug is fixed."

    * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
    ARM: 7641/1: memory: fix broken mmap by ensuring TASK_UNMAPPED_BASE is aligned
    ARM: DMA mapping: fix bad atomic test
    ARM: realview: ensure that we have sufficient IRQs available
    ARM: GIC: fix GIC cpumask initialization

    Linus Torvalds
     
  • Pull networking fixes from David Miller:

    1) Revert iwlwifi reclaimed packet tracking, it causes problems for a
    bunch of folks. From Emmanuel Grumbach.

    2) Work limiting code in brcmsmac wifi driver can clear tx status
    without processing the event. From Arend van Spriel.

    3) rtlwifi USB driver processes wrong SKB, fix from Larry Finger.

    4) l2tp tunnel delete can race with close, fix from Tom Parkin.

    5) pktgen_add_device() failures are not checked at all, fix from Cong
    Wang.

    6) Fix unintentional removal of carrier off from tun_detach(),
    otherwise we confuse userspace, from Michael S. Tsirkin.

    7) Don't leak socket reference counts and ubufs in vhost-net driver,
    from Jason Wang.

    8) vmxnet3 driver gets it's initial carrier state wrong, fix from Neil
    Horman.

    9) Protect against USB networking devices which spam the host with 0
    length frames, from Bjørn Mork.

    10) Prevent neighbour overflows in ipv6 for locally destined routes,
    from Marcelo Ricardo. This is the best short-term fix for this, a
    longer term fix has been implemented in net-next.

    11) L2TP uses ipv4 datagram routines in it's ipv6 code, whoops. This
    mistake is largely because the ipv6 functions don't even have some
    kind of prefix in their names to suggest they are ipv6 specific.
    From Tom Parkin.

    12) Check SYN packet drops properly in tcp_rcv_fastopen_synack(), from
    Yuchung Cheng.

    13) Fix races and TX skb freeing bugs in via-rhine's NAPI support, from
    Francois Romieu and your's truly.

    14) Fix infinite loops and divides by zero in TCP congestion window
    handling, from Eric Dumazet, Neal Cardwell, and Ilpo Järvinen.

    15) AF_PACKET tx ring handling can leak kernel memory to userspace, fix
    from Phil Sutter.

    16) Fix error handling in ipv6 GRE tunnel transmit, from Tommi Rantala.

    17) Protect XEN netback driver against hostile frontend putting garbage
    into the rings, don't leak pages in TX GOP checking, and add proper
    resource releasing in error path of xen_netbk_get_requests(). From
    Ian Campbell.

    18) SCTP authentication keys should be cleared out and released with
    kzfree(), from Daniel Borkmann.

    19) L2TP is a bit too clever trying to maintain skb->truesize, and ends
    up corrupting socket memory accounting to the point where packet
    sending is halted indefinitely. Just remove the adjustments
    entirely, they aren't really needed. From Eric Dumazet.

    20) ATM Iphase driver uses a data type with the same name as the S390
    headers, rename to fix the build. From Heiko Carstens.

    21) Fix a typo in copying the inner network header offset from one SKB
    to another, from Pravin B Shelar.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (56 commits)
    net: sctp: sctp_endpoint_free: zero out secret key data
    net: sctp: sctp_setsockopt_auth_key: use kzfree instead of kfree
    atm/iphase: rename fregt_t -> ffreg_t
    net: usb: fix regression from FLAG_NOARP code
    l2tp: dont play with skb->truesize
    net: sctp: sctp_auth_key_put: use kzfree instead of kfree
    netback: correct netbk_tx_err to handle wrap around.
    xen/netback: free already allocated memory on failure in xen_netbk_get_requests
    xen/netback: don't leak pages on failure in xen_netbk_tx_check_gop.
    xen/netback: shutdown the ring if it contains garbage.
    net: qmi_wwan: add more Huawei devices, including E320
    net: cdc_ncm: add another Huawei vendor specific device
    ipv6/ip6_gre: fix error case handling in ip6gre_tunnel_xmit()
    tcp: fix for zero packets_in_flight was too broad
    brcmsmac: rework of mac80211 .flush() callback operation
    ssb: unregister gpios before unloading ssb
    bcma: unregister gpios before unloading bcma
    rtlwifi: Fix scheduling while atomic bug
    net: usbnet: fix tx_dropped statistics
    tcp: ipv6: Update MIB counters for drops
    ...

    Linus Torvalds
     
  • John W. Linville says:

    ====================
    Please accept this pull request intended for the 3.9 stream!

    Included are a mac80211 pull, an iwlwifi pull (actually two -- one
    was a fast-forward), a wl12xx pull, and a couple of Bluetooth pulls.

    On mac80211, Johannes says:

    "I've included
    * AKM definitions from Bing,
    * mesh fixes from Thomas, including a fix from him for me breaking his
    patch while applying,
    * channel check fix from Simon,
    * an old patch from Yoni Divinsky who doesn't even work for TI any
    more, to configure the WEP TX key for ARP offload etc.
    * MAC ACL API from Vasanth
    * a fix for the infamous chanctx_conf warning from Arnd
    * from myself, a fix for my previous aggregation changes, some cleanup
    and some improvements and fixes for WoWLAN"

    On iwlwifi, Johannes says:

    "Two small changes for iwlwifi-next, one to update all our Copyright
    notices and one to provide the RX page order."

    And also:

    "So what I have here is some cleanups, preparations and the new MVM
    (multi-virtual MAC) driver itself and (this is new) some work on the
    transport API as well as a message flooding fix."

    On wl12xx, Luca says:

    "Lots of bugfixes and improvements in our TI wireless drivers,
    including support for multi-channel. Intended for 3.9."

    On Bluetooth, Gustavo says:

    "This is my first pull request to 3.9. The biggest changes here are from Johan
    Hedberg who made a lot of fixes in the Management interface. The issues arose
    due to a new test tool we wrote and the usage of the Management interface as
    default in BlueZ 5. The rest of the patches are more clean ups and small
    fixes."

    And also:

    "Here goes another batch intended for 3.9, the majority of the patch here are
    from Johan who is fixing many issues in the management interface that have
    appeared lately. The rest of the patches are just small improvements, fixes
    and clean ups."

    Along with those are the usual variety of updates/enhancements to
    the mwl8k, mwifiex, ath9k, rtlwifi, and rt2x00 drivers as well as
    a few updates for the ssb and bcma busses. I don't think there are
    any big headliners there.

    Please let me know if there are problems!
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Daniel Borkmann says:

    ====================
    Cryptographically used keys should be zeroed out when our session
    ends resp. memory is freed, thus do not leave them somewhere in the
    memory.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • On sctp_endpoint_destroy, previously used sensitive keying material
    should be zeroed out before the memory is returned, as we already do
    with e.g. auth keys when released.

    Signed-off-by: Daniel Borkmann
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • In sctp_setsockopt_auth_key, we create a temporary copy of the user
    passed shared auth key for the endpoint or association and after
    internal setup, we free it right away. Since it's sensitive data, we
    should zero out the key before returning the memory back to the
    allocator. Thus, use kzfree instead of kfree, just as we do in
    sctp_auth_key_put().

    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • We have conflicting type qualifiers for "freg_t" in s390's ptrace.h and the
    iphase atm device driver, which causes the compile error below.
    Unfortunately the s390 typedef can't be renamed, since it's a user visible api,
    nor can I change the include order in s390 code to avoid the conflict.

    So simply rename the iphase typedef to a new name. Fixes this compile error:

    In file included from drivers/atm/iphase.c:66:0:
    drivers/atm/iphase.h:639:25: error: conflicting type qualifiers for 'freg_t'
    In file included from next/arch/s390/include/asm/ptrace.h:9:0,
    from next/arch/s390/include/asm/lowcore.h:12,
    from next/arch/s390/include/asm/thread_info.h:30,
    from include/linux/thread_info.h:54,
    from include/linux/preempt.h:9,
    from include/linux/spinlock.h:50,
    from include/linux/seqlock.h:29,
    from include/linux/time.h:5,
    from include/linux/stat.h:18,
    from include/linux/module.h:10,
    from drivers/atm/iphase.c:43:
    next/arch/s390/include/uapi/asm/ptrace.h:197:3: note: previous declaration of 'freg_t' was here

    Signed-off-by: Heiko Carstens
    Acked-by: chas williams - CONTRACTOR
    Signed-off-by: David S. Miller

    Heiko Carstens
     
  • …wireless-next into for-davem

    John W. Linville
     

08 Feb, 2013

17 commits

  • We have received multiple reports of mmap failures when running with a
    2:2 vm split. These manifest as either -EINVAL with a non page-aligned
    address (ending 0xaaa) or a SEGV, depending on the application. The
    issue is commonly observed in children of make, which appears to use
    bottom-up mmap (assumedly because it changes the stack rlimit).

    Further investigation reveals that this regression was triggered by
    394ef6403abc ("mm: use vm_unmapped_area() on arm architecture"), whereby
    TASK_UNMAPPED_BASE is no longer page-aligned for bottom-up mmap, causing
    get_unmapped_area to choke on misaligned addressed.

    This patch fixes the problem by defining TASK_UNMAPPED_BASE in terms of
    TASK_SIZE and explicitly aligns the result to 16M, matching the other
    end of the heap.

    Acked-by: Nicolas Pitre
    Reported-by: Steve Capper
    Reported-by: Jean-Francois Moine
    Reported-by: Christoffer Dall
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Will Deacon
     
  • Realview fails to boot with this warning:
    BUG: spinlock lockup suspected on CPU#0, init/1
    lock: 0xcf8bde10, .magic: dead4ead, .owner: init/1, .owner_cpu: 0
    Backtrace:
    [] (dump_backtrace+0x0/0x10c) from [] (dump_stack+0x18/0x1c) r6:cf8bde10 r5:cf83d1c0 r4:cf8bde10 r3:cf83d1c0
    [] (dump_stack+0x0/0x1c) from [] (spin_dump+0x84/0x98)
    [] (spin_dump+0x0/0x98) from [] (do_raw_spin_lock+0x100/0x198)
    [] (do_raw_spin_lock+0x0/0x198) from [] (_raw_spin_lock+0x3c/0x44)
    [] (_raw_spin_lock+0x0/0x44) from [] (pl011_console_write+0xe8/0x11c)
    [] (pl011_console_write+0x0/0x11c) from [] (call_console_drivers.clone.7+0xdc/0x104)
    [] (call_console_drivers.clone.7+0x0/0x104) from [] (console_unlock+0x2e8/0x454)
    [] (console_unlock+0x0/0x454) from [] (vprintk_emit+0x2d8/0x594)
    [] (vprintk_emit+0x0/0x594) from [] (printk+0x3c/0x44)
    [] (printk+0x0/0x44) from [] (warn_slowpath_common+0x28/0x6c)
    [] (warn_slowpath_common+0x0/0x6c) from [] (warn_slowpath_null+0x24/0x2c)
    [] (warn_slowpath_null+0x0/0x2c) from [] (lockdep_trace_alloc+0xd8/0xf0)
    [] (lockdep_trace_alloc+0x0/0xf0) from [] (kmem_cache_alloc+0x24/0x11c)
    [] (kmem_cache_alloc+0x0/0x11c) from [] (__get_vm_area_node.clone.24+0x7c/0x16c)
    [] (__get_vm_area_node.clone.24+0x0/0x16c) from [] (get_vm_area_caller+0x48/0x54)
    [] (get_vm_area_caller+0x0/0x54) from [] (__alloc_remap_buffer.clone.15+0x38/0xb8)
    [] (__alloc_remap_buffer.clone.15+0x0/0xb8) from [] (__dma_alloc+0x160/0x2c8)
    [] (__dma_alloc+0x0/0x2c8) from [] (arm_dma_alloc+0x88/0xa0)[] (arm_dma_alloc+0x0/0xa0) from [] (dma_pool_alloc+0xcc/0x1a8)
    [] (dma_pool_alloc+0x0/0x1a8) from [] (pl08x_fill_llis_for_desc+0x28/0x568)
    [] (pl08x_fill_llis_for_desc+0x0/0x568) from [] (pl08x_prep_slave_sg+0x258/0x3b0)
    [] (pl08x_prep_slave_sg+0x0/0x3b0) from [] (pl011_dma_tx_refill+0x140/0x288)
    [] (pl011_dma_tx_refill+0x0/0x288) from [] (pl011_start_tx+0xe4/0x120)
    [] (pl011_start_tx+0x0/0x120) from [] (__uart_start+0x48/0x4c)
    [] (__uart_start+0x0/0x4c) from [] (uart_start+0x2c/0x3c)
    [] (uart_start+0x0/0x3c) from [] (uart_write+0xcc/0xf4)
    [] (uart_write+0x0/0xf4) from [] (n_tty_write+0x1c0/0x3e4)
    [] (n_tty_write+0x0/0x3e4) from [] (tty_write+0x144/0x240)
    [] (tty_write+0x0/0x240) from [] (redirected_tty_write+0x98/0xac)
    [] (redirected_tty_write+0x0/0xac) from [] (vfs_write+0xbc/0x150)
    [] (vfs_write+0x0/0x150) from [] (sys_write+0x4c/0x78)
    [] (sys_write+0x0/0x78) from [] (ret_fast_syscall+0x0/0x3c)

    This happens because the DMA allocation code is not respecting atomic
    allocations correctly.

    GFP flags should not be tested for GFP_ATOMIC to determine if an
    atomic allocation is being requested. GFP_ATOMIC is not a flag but
    a value. The GFP bitmask flags are all prefixed with __GFP_.

    The rest of the kernel tests for __GFP_WAIT not being set to indicate
    an atomic allocation. We need to do the same.

    Signed-off-by: Russell King

    Russell King
     
  • Realview EB with a rev B MPcore tile results in lots of warnings at
    boot because it can't allocate enough IRQs. Fix this by increasing
    the number of available IRQs.

    WARNING: at /home/rmk/git/linux-rmk/arch/arm/common/gic.c:757 gic_init_bases+0x12c/0x2ec()
    Cannot allocate irq_descs @ IRQ96, assuming pre-allocated
    Modules linked in:
    Backtrace:
    [] (dump_backtrace+0x0/0x10c) from [] (dump_stack+0x18/0x1c) r6:000002f5 r5:c042c62c r4:c044ff40 r3:c045f240
    [] (dump_stack+0x0/0x1c) from [] (warn_slowpath_common+0x54/0x6c)
    [] (warn_slowpath_common+0x0/0x6c) from [] (warn_slowpath_fmt+0x38/0x40)
    [] (warn_slowpath_fmt+0x0/0x40) from [] (gic_init_bases+0x12c/0x2ec)
    [] (gic_init_bases+0x0/0x2ec) from [] (gic_init_irq+0x8c/0xd8)
    [] (gic_init_irq+0x0/0xd8) from [] (init_IRQ+0x1c/0x24)
    [] (init_IRQ+0x0/0x24) from [] (start_kernel+0x1a4/0x300)
    [] (start_kernel+0x0/0x300) from [] (0x70008070)
    ---[ end trace 1b75b31a2719ed1c ]---
    ------------[ cut here ]------------
    WARNING: at /home/rmk/git/linux-rmk/kernel/irq/irqdomain.c:234 irq_domain_add_legacy+0x80/0x140()
    Modules linked in:
    Backtrace:
    [] (dump_backtrace+0x0/0x10c) from [] (dump_stack+0x18/0x1c) r6:000000ea r5:c0081a38 r4:00000000 r3:c045f240
    [] (dump_stack+0x0/0x1c) from [] (warn_slowpath_common+0x54/0x6c)
    [] (warn_slowpath_common+0x0/0x6c) from [] (warn_slowpath_null+0x24/0x2c)
    [] (warn_slowpath_null+0x0/0x2c) from [] (irq_domain_add_legacy+0x80/0x140)
    [] (irq_domain_add_legacy+0x0/0x140) from [] (gic_init_bases+0x14c/0x2ec)
    [] (gic_init_bases+0x0/0x2ec) from [] (gic_init_irq+0x8c/0xd8)
    [] (gic_init_irq+0x0/0xd8) from [] (init_IRQ+0x1c/0x24)
    [] (init_IRQ+0x0/0x24) from [] (start_kernel+0x1a4/0x300)
    [] (start_kernel+0x0/0x300) from [] (0x70008070)
    ---[ end trace 1b75b31a2719ed1d ]---
    ------------[ cut here ]------------
    WARNING: at /home/rmk/git/linux-rmk/arch/arm/common/gic.c:762 gic_init_bases+0x170/0x2ec()
    Modules linked in:
    Backtrace:
    [] (dump_backtrace+0x0/0x10c) from [] (dump_stack+0x18/0x1c) r6:000002fa r5:c042c670 r4:00000000 r3:c045f240
    [] (dump_stack+0x0/0x1c) from [] (warn_slowpath_common+0x54/0x6c)
    [] (warn_slowpath_common+0x0/0x6c) from [] (warn_slowpath_null+0x24/0x2c)
    [] (warn_slowpath_null+0x0/0x2c) from [] (gic_init_bases+0x170/0x2ec)
    [] (gic_init_bases+0x0/0x2ec) from [] (gic_init_irq+0x8c/0xd8)
    [] (gic_init_irq+0x0/0xd8) from [] (init_IRQ+0x1c/0x24)
    [] (init_IRQ+0x0/0x24) from [] (start_kernel+0x1a4/0x300)
    [] (start_kernel+0x0/0x300) from [] (0x70008070)
    ---[ end trace 1b75b31a2719ed1e ]---

    Signed-off-by: Russell King

    Russell King
     
  • Punit Agrawal reports:
    > I was trying to boot 3.8-rc5 on Realview EB 11MPCore using
    > realview-smp_defconfig as a starting point but the kernel failed to
    > progress past the log below (config attached).
    >
    > Pawel suggested I try reverting 384a290283f - "ARM: gic: use a private
    > mapping for CPU target interfaces" that you've authored. With this
    > commit reverted the kernel boots.
    >
    > I am not quite sure why the commit breaks 11MPCore but Pawel (cc'd)
    > might be able to shed light on that.

    Some early GIC implementations return zero for the first distributor
    CPU routing register. This means we can't rely on that telling us
    which CPU interface we're connected to. We know that these platforms
    implement PPIs for IRQs 29-31 - but we shouldn't assume that these
    will always be populated.

    So, instead, scan for a non-zero CPU routing register in the first
    32 IRQs and use that as our CPU mask.

    Reported-by: Punit Agrawal
    Reviewed-by: Nicolas Pitre
    Signed-off-by: Russell King

    Russell King
     
  • Pull drm regression fix from Dave Airlie:
    "This one fixes a sleep while locked regression that was introduced
    earlier in 3.8."

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    drm/ttm: fix fence locking in ttm_buffer_object_transfer, 2nd try

    Linus Torvalds
     
  • In commit 6509141f9c2ba74df6cc72ec35cd1865276ae3a4 ("usbnet: add new
    flag FLAG_NOARP for usb net devices"), the newly added flag NOARP was
    using an already defined value, which broke drivers using flag
    MULTI_PACKET.

    Signed-off-by: Lucas Stach
    Signed-off-by: David S. Miller

    Lucas Stach
     
  • Andrew Savchenko reported a DNS failure and we diagnosed that
    some UDP sockets were unable to send more packets because their
    sk_wmem_alloc was corrupted after a while (tx_queue column in
    following trace)

    $ cat /proc/net/udp
    sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode ref pointer drops
    ...
    459: 00000000:0270 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 4507 2 ffff88003d612380 0
    466: 00000000:0277 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 4802 2 ffff88003d613180 0
    470: 076A070A:007B 00000000:0000 07 FFFF4600:00000000 00:00000000 00000000 123 0 5552 2 ffff880039974380 0
    470: 010213AC:007B 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 4986 2 ffff88003dbd3180 0
    470: 010013AC:007B 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 4985 2 ffff88003dbd2e00 0
    470: 00FCA8C0:007B 00000000:0000 07 FFFFFB00:00000000 00:00000000 00000000 0 0 4984 2 ffff88003dbd2a80 0
    ...

    Playing with skb->truesize is tricky, especially when
    skb is attached to a socket, as we can fool memory charging.

    Just remove this code, its not worth trying to be ultra
    precise in xmit path.

    Reported-by: Andrew Savchenko
    Tested-by: Andrew Savchenko
    Signed-off-by: Eric Dumazet
    Cc: James Chapman
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Attention linux-next maintainer, you will hit a merge conflict between
    this merge and the mips tree, the resolution is to preserve the removal
    of uses of nvram_geenv() and nvram_parse_macaddr() from the net-next
    side.

    Hauke Mehrtens says:

    ====================
    These patches are adding support for the Ethernet core found in the
    BCM4705/BCM4785 SoC.

    This is based on current master of davem/net-next.git.

    v4:
    * move setting of DMA_RWCTRL_ONE_DMA

    v3:
    * combined first two patches into one patch

    v2:
    * use of struct sprom in ssb_gige_get_macaddr() instead of accessing
    the nvram directly
    * add return value to ssb_gige_get_macaddr()
    * try to read the mac address from ssb core before accessing the own
    registers.
    * fix two checkpatch warnings
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • The BCM4785 or sometimes named BMC4705 is a Broadcom SoC which a
    Gigabit 5750 Ethernet core. The core is connected via PCI with the rest
    of the SoC, but it uses some extension.

    This core does not use a firmware or an eeprom.

    Some devices only have a switch which supports 100MBit/s, this
    currently does not work with this driver.

    This patch was original written by Michael Buesch and is in
    OpenWrt for some years now.

    This was tested on a Linksys WRT610N V1 and older versions of this patch
    were tested by other people on different devices.

    Signed-off-by: Hauke Mehrtens
    Acked-by: Michael Chan
    Signed-off-by: David S. Miller

    Hauke Mehrtens
     
  • In OpenWrt we currently use a switch driver which uses the ioctls to
    configure the switch in the phy. We have to provide the phy_id to do
    so, but without this patch this is not possible.

    Signed-off-by: Hauke Mehrtens
    Acked-by: Michael Chan
    Signed-off-by: David S. Miller

    Hauke Mehrtens
     
  • The mac address is already stored in the sprom structure by the
    platform code of the SoC this Ethernet core is found on, it just has to
    be fetched from this structure instead of accessing the nvram here.
    This patch also adds a return value to indicate if a mac address could
    be fetched from the sprom structure.
    When CONFIG_SSB_DRIVER_GIGE is not set the header file now also declares
    ssb_gige_get_macaddr().

    Signed-off-by: Hauke Mehrtens
    Acked-by: Michael Buesch
    Signed-off-by: David S. Miller

    Hauke Mehrtens
     
  • Instead of calling 3 times ntohs(random->param_hdr.length), 2 times
    ntohs(hmacs->param_hdr.length), and 3 times ntohs(chunks->param_hdr.length)
    within the same function, we only call each once and store it in a
    variable.

    Signed-off-by: Daniel Borkmann
    Acked-by: Neil Horman
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • For sensitive data like keying material, it is common practice to zero
    out keys before returning the memory back to the allocator. Thus, use
    kzfree instead of kfree.

    Signed-off-by: Daniel Borkmann
    Acked-by: Neil Horman
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • …vswitch into openvswitch

    Jesse Gross says:

    ====================
    One bug fix for net/3.8 for a long standing problem that was reported a few
    times recently.
    ====================

    Signed-off-by: David S. Miller <davem@davemloft.net>

    David S. Miller
     
  • =========================================================
    [ INFO: possible irq lock inversion dependency detected ]
    3.8.0-rc5+ #82 Not tainted
    ---------------------------------------------------------
    swapper/0/0 just changed the state of lock:
    (&(&fep->hw_lock)->rlock){..-...}, at: [] fec_enet_start_xmit+0x48/0x 2cc
    but this lock took another, SOFTIRQ-unsafe lock in the past:
    (prepare_lock){+.+.+.}

    and interrupts could create inverse lock ordering between them.
    other info that might help us debug this:
    Possible interrupt unsafe locking scenario:

    CPU0 CPU1
    ---- ----
    lock(prepare_lock);
    local_irq_disable()
    lock(&(&fep->hw_lock)->rlock);
    lock(prepare_lock);

    lock(&(&fep->hw_lock)->rlock);

    *** DEADLOCK ***

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

    Frank Li
     
  • Old method will cause init spinlock twice.
    New method will avoid init spinlock twice and fix miss init spinlock
    at fec_restart.

    BUG: spinlock bad magic on CPU#1, swapper/0/1
    lock: 0xbfae0f8c, .magic: 00000000, .owner: /-1, .owner_cpu: 0
    Backtrace:
    [] (dump_backtrace+0x0/0x10c) from [] (dump_stack+0x18/0x1c)
    r6:bfae0000 r5:bfae0f8c r4:00000000 r3:806c1310
    [] (dump_stack+0x0/0x1c) from [] (spin_dump+0x80/0x94)
    [] (spin_dump+0x0/0x94) from [] (spin_bug+0x2c/0x30)
    r5:805f6f8c r4:bfae0f8c
    [] (spin_bug+0x0/0x30) from [] (do_raw_spin_lock+0x170/0x1b0 )
    r5:806b4950 r4:bfae0f8c
    [] (do_raw_spin_lock+0x0/0x1b0) from [] (_raw_spin_lock_irqs ave+0x18/0x20)
    [] (_raw_spin_lock_irqsave+0x0/0x20) from [] (fec_ptp_start_ cyclecounter+0x3c/0x120)
    r4:bfae0f8c r3:00000002
    [] (fec_ptp_start_cyclecounter+0x0/0x120) from [] (fec_resta rt+0x56c/0x5f8)
    r8:00000000 r7:806e6f48 r6:00000112 r5:806b4950 r4:bfae0000
    [] (fec_restart+0x0/0x5f8) from [] (fec_probe+0x508/0xa48)

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

    Frank Li
     
  • Fix issue in Mellanox driver related to BQL. netdev_tx_reset_queue
    was not being called in certain situations where the device was
    being start and stopped. Moved netdev_tx_reset_queue from the reset
    device path to mlx4_en_free_tx_buf which is where the rings are
    cleaned in a reset (specifically from device being stopped).

    Signed-off-by: Tom Herbert
    Acked-By: Amir Vadai
    Signed-off-by: David S. Miller

    Tom Herbert