24 Apr, 2013

4 commits


23 Apr, 2013

26 commits

  • batadv_mesh_free() schedules some RCU callbacks which need the bat_priv struct
    to do their jobs, while free_netdev(), which is called immediately after, is
    destroying the private data.

    Put an rcu_barrier() in the middle so that free_netdev() is invoked only after
    all the callbacks returned.

    This bug has been introduced by ab8f433dd39be94e8617cff2dfe9f7eca162eb15
    ("batman-adv: Move deinitialization of soft-interface to destructor")

    Signed-off-by: Antonio Quartulli
    Signed-off-by: Marek Lindner
    Signed-off-by: David S. Miller

    Antonio Quartulli
     
  • Conflicts:
    drivers/net/ethernet/emulex/benet/be_main.c
    drivers/net/ethernet/intel/igb/igb_main.c
    drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
    include/net/scm.h
    net/batman-adv/routing.c
    net/ipv4/tcp_input.c

    The e{uid,gid} --> {uid,gid} credentials fix conflicted with the
    cleanup in net-next to now pass cred structs around.

    The be2net driver had a bug fix in 'net' that overlapped with the VLAN
    interface changes by Patrick McHardy in net-next.

    An IGB conflict existed because in 'net' the build_skb() support was
    reverted, and in 'net-next' there was a comment style fix within that
    code.

    Several batman-adv conflicts were resolved by making sure that all
    calls to batadv_is_my_mac() are changed to have a new bat_priv first
    argument.

    Eric Dumazet's TS ECR fix in TCP in 'net' conflicted with the F-RTO
    rewrite in 'net-next', mostly overlapping changes.

    Thanks to Stephen Rothwell and Antonio Quartulli for help with several
    of these merge resolutions.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This driver uses the crummy "| foo" style, putting the
    logical operation at the beginning of lines. Then
    when the VLAN tag flag bits got changed the operator
    ended up at both the end and the beginning of some lines.

    Fix the build error by having it uniformly use the operator
    at the end of the line.

    Reported-by: Stephen Rothwell
    Signed-off-by: David S. Miller

    David S. Miller
     
  • Several call sites were missed when the protocol argument was added to
    __vlan_hwaccel_put_tag() in commit
    86a9bad3ab6b6f858fd4443b48738cabbb6d094c ("net: vlan: add protocol
    argument to packet tagging functions").

    Reported-by: Stephen Rothwell
    Signed-off-by: David S. Miller

    David S. Miller
     
  • struct sctp_packet is currently embedded into sctp_transport or
    sits on the stack as 'singleton' in sctp_outq_flush(). Therefore,
    its member 'malloced' is always 0, thus a kfree() is never called.
    Because of that, we can just remove this code.

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

    Daniel Borkmann
     
  • Allow L2 redirection when VXLAN L3 switching is enabled

    This patch restricts L3 switching to destination MAC addresses that are
    marked as routers in order to allow virtual IP appliances that do L2
    redirection to function with VXLAN L3 switching enabled.

    We use L3 switching on VXLAN networks to avoid extra hops when the nominal
    router for cross-subnet traffic for a VM is remote and the ultimate
    destination may be local, or closer to the local node. Currently, the
    destination IP address takes precedence over the MAC address in all cases.
    Some network appliances receive packets for a virtualized IP address and
    redirect by changing the destination MAC address (only) to be the final
    destination for packet processing. VXLAN tunnel endpoints with L3 switching
    enabled may then overwrite this destination MAC address based on the packet IP
    address, resulting in potential loops and, at least, breaking L2 redirections
    that travel through tunnel endpoints.

    This patch limits L3 switching to the intended case where the original
    destination MAC address is a next-hop router and relies on the destination
    MAC address for all other cases, thus allowing L2 redirection and L3 switching
    to coexist peacefully.

    Signed-Off-By: David L Stevens
    Signed-off-by: David S. Miller

    David Stevens
     
  • The return value from list_netdevice() is not used and no need, so remove it.

    Signed-off-by: Ding Tianhong
    Signed-off-by: David S. Miller

    dingtianhong
     
  • dl_next member in struct request_sock doesn't need to be first.

    We expect to insert a "struct common_sock" or a subset of it,
    so this claim had to be verified.

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

    Eric Dumazet
     
  • qeth_hdr_chk_and_bounce() can possibly shift the skb->data
    pointer. However, the existing code didn't update the hdr pointer,
    which should point to skb->data, accordingly.
    Symptoms of this issue are sporadic recoveries.

    Signed-off-by: Stefan Raspl
    Signed-off-by: Frank Blaschka
    Signed-off-by: David S. Miller

    Stefan Raspl
     
  • remove unused variable

    Signed-off-by: Stefan Raspl
    Signed-off-by: Frank Blaschka
    Signed-off-by: David S. Miller

    Stefan Raspl
     
  • remove cast for kzalloc return value.

    Signed-off-by: Zhang Yanfei
    Signed-off-by: Heiko Carstens
    Signed-off-by: Frank Blaschka
    Signed-off-by: David S. Miller

    Zhang Yanfei
     
  • Some frontend drivers are sending packets > 64 KiB in length. This length
    overflows the length field in the first slot making the following slots have
    an invalid length.

    Turn this error back into a non-fatal error by dropping the packet. To avoid
    having the following slots having fatal errors, consume all slots in the
    packet.

    This does not reopen the security hole in XSA-39 as if the packet as an
    invalid number of slots it will still hit fatal error case.

    Signed-off-by: David Vrabel
    Signed-off-by: Wei Liu
    Acked-by: Ian Campbell
    Signed-off-by: David S. Miller

    Wei Liu
     
  • This patch tries to coalesce tx requests when constructing grant copy
    structures. It enables netback to deal with situation when frontend's
    MAX_SKB_FRAGS is larger than backend's MAX_SKB_FRAGS.

    With the help of coalescing, this patch tries to address two regressions
    avoid reopening the security hole in XSA-39.

    Regression 1. The reduction of the number of supported ring entries (slots)
    per packet (from 18 to 17). This regression has been around for some time but
    remains unnoticed until XSA-39 security fix. This is fixed by coalescing
    slots.

    Regression 2. The XSA-39 security fix turning "too many frags" errors from
    just dropping the packet to a fatal error and disabling the VIF. This is fixed
    by coalescing slots (handling 18 slots when backend's MAX_SKB_FRAGS is 17)
    which rules out false positive (using 18 slots is legit) and dropping packets
    using 19 to `max_skb_slots` slots.

    To avoid reopening security hole in XSA-39, frontend sending packet using more
    than max_skb_slots is considered malicious.

    The behavior of netback for packet is thus:

    1-18 slots: valid
    19-max_skb_slots slots: drop and respond with an error
    max_skb_slots+ slots: fatal error

    max_skb_slots is configurable by admin, default value is 20.

    Also change variable name from "frags" to "slots" in netbk_count_requests.

    Please note that RX path still has dependency on MAX_SKB_FRAGS. This will be
    fixed with separate patch.

    Signed-off-by: Wei Liu
    Acked-by: Ian Campbell
    Signed-off-by: David S. Miller

    Wei Liu
     
  • The maximum packet including header that can be handled by netfront / netback
    wire format is 65535. Reduce gso_max_size accordingly.

    Drop skb and print warning when skb->len > 65535. This can 1) save the effort
    to send malformed packet to netback, 2) help spotting misconfiguration of
    netfront in the future.

    Signed-off-by: Wei Liu
    Acked-by: Ian Campbell
    Signed-off-by: David S. Miller

    Wei Liu
     
  • Also fix a typo in comment.

    Signed-off-by: Wei Liu
    Acked-by: Ian Campbell
    Signed-off-by: David S. Miller

    Wei Liu
     
  • This patch sets the coherent DMA mask to 64-bit after the be2net driver has
    been acknowledged that the system is 64-bit DMA capable. The coherent DMA
    mask is examined by the Intel IOMMU driver to determine whether to allow
    pass through context mapping for all devices. With this patch, the be2net
    driver combined with be2net compatible hardware provides comparable
    performance to the case where vt-d is disabled. The main use-case for this
    change is to decrease the time necessary to copy virtual machine memory
    during KVM live migration instantiations.

    This patch was tested on a system that enables the IOMMU in non-coherent
    mode. Two DMA remapper issues were encountered in the previous version and
    both patches have been committed.
    commit ea2447f700cab264019b52e2b417d689e052dcfd
    commit 2e12bc29fc5a12242d68e11875db3dd58efad9ff

    Signed-off-by: Craig Hada
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Craig Hada
     
  • Use GET_PROFILE_CONFIG_V1 cmd for BE3-R, to query the maximum number of
    TX rings available per function. On SH-R the same is queried via the
    GET_FUNCTION_CONFIG cmd.

    Signed-off-by: Vasundhara Volam
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Vasundhara Volam
     
  • Avoid flashing BE3 UFI on BE3-R chip by verifying asic_revision
    number of the chip.

    Signed-off-by: Vasundhara Volam
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Vasundhara Volam
     
  • Don't log "Out of MCCQ wrbs" msg. When the driver doesn't receive any
    response from the FW it already logs a "FW not responding" message.
    The driver runs out of MCCQ wrbs much later. Also, this message can
    swamp the kernel log in HW/FW error scenarios.

    Signed-off-by: Vasundhara Volam
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Vasundhara Volam
     
  • Skyhawk-R and BE3-R (SuperNIC profile) require V2 version
    of TXQ_CREATE cmd to be used.

    Signed-off-by: Vasundhara Volam
    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Vasundhara Volam
     
  • Signed-off-by: Dmitry Kravkov
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Dmitry Kravkov
     
  • Signed-off-by: Dmitry Kravkov
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Dmitry Kravkov
     
  • a. Common tree of `dir` structures.
    b. Multi-port devices structures.

    CC: Francious Romieu
    Signed-off-by: Dmitry Kravkov
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Dmitry Kravkov
     
  • CC: Francious Romieu
    Signed-off-by: Dmitry Kravkov
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Dmitry Kravkov
     
  • CC: Francious Romieu
    Signed-off-by: Dmitry Kravkov
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Dmitry Kravkov
     
  • introduce a procedure to read in u32 granularity.

    CC: Francious Romieu
    Signed-off-by: Dmitry Kravkov
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Dmitry Kravkov
     

22 Apr, 2013

7 commits

  • Linus Torvalds
     
  • drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_add_vlan_mc':
    >> drivers/s390/net/qeth_l3_main.c:1662:3: error: too few arguments to function '__vlan_find_dev_deep'
    include/linux/if_vlan.h:88:27: note: declared here
    drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_add_vlan_mc6':
    >> drivers/s390/net/qeth_l3_main.c:1723:3: error: too few arguments to function '__vlan_find_dev_deep'
    include/linux/if_vlan.h:88:27: note: declared here
    drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_free_vlan_addresses4':
    >> drivers/s390/net/qeth_l3_main.c:1767:2: error: too few arguments to function '__vlan_find_dev_deep'
    include/linux/if_vlan.h:88:27: note: declared here
    drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_free_vlan_addresses6':
    >> drivers/s390/net/qeth_l3_main.c:1797:2: error: too few arguments to function '__vlan_find_dev_deep'
    include/linux/if_vlan.h:88:27: note: declared here
    drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_process_inbound_buffer':
    >> drivers/s390/net/qeth_l3_main.c:1980:6: error: too few arguments to function '__vlan_hwaccel_put_tag'
    include/linux/if_vlan.h:234:31: note: declared here
    drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_verify_vlan_dev':
    >> drivers/s390/net/qeth_l3_main.c:2089:3: error: too few arguments to function '__vlan_find_dev_deep'
    include/linux/if_vlan.h:88:27: note: declared here

    Reported-by: kbuild test robot
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Add missing return statement for CONFIG_BUG=n.

    Reported-by: kbuild test robot
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Fix up some function signatures for CONFIG_VLAN=n that were missed during
    the 802.1ad support patches.

    Found by the kbuild robot.

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

    Patrick McHardy
     
  • The following leak is reported by kmemleak:

    [ 86.812073] kmemleak: Found object by alias at 0xffff88006ecc76f0
    [ 86.816019] Pid: 739, comm: kworker/u:1 Not tainted 3.9.0-rc5+ #842
    [ 86.816019] Call Trace:
    [ 86.816019] [] find_and_get_object+0x8c/0xdf
    [ 86.816019] [] ? vlan_info_rcu_free+0x33/0x49
    [ 86.816019] [] delete_object_full+0x13/0x2f
    [ 86.816019] [] kmemleak_free+0x26/0x45
    [ 86.816019] [] slab_free_hook+0x1e/0x7b
    [ 86.816019] [] kfree+0xce/0x14b
    [ 86.816019] [] vlan_info_rcu_free+0x33/0x49
    [ 86.816019] [] rcu_do_batch+0x261/0x4e7

    The reason is that in vlan_info_rcu_free() we don't take the VLAN protocol
    into account when iterating over the vlan_devices_array.

    Reported-by: Cong Wang
    Signed-off-by: Patrick McHardy
    Tested-by: Cong Wang
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Pull perf fixes from Ingo Molnar:
    "Misc fixes"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/x86: Fix offcore_rsp valid mask for SNB/IVB
    perf: Treat attr.config as u64 in perf_swevent_init()

    Linus Torvalds
     
  • I'm going to do an -rc8, so I'm just going to do this rather than delay
    it any further. They are arguably stable material anyway.

    * vm_ioremap_memory-examples:
    mtdchar: remove no-longer-used vma helpers
    vm: convert snd_pcm_lib_mmap_iomem() to vm_iomap_memory() helper
    vm: convert fb_mmap to vm_iomap_memory() helper
    vm: convert mtdchar mmap to vm_iomap_memory() helper
    vm: convert HPET mmap to vm_iomap_memory() helper

    Linus Torvalds
     

21 Apr, 2013

3 commits

  • Pull kdump fixes from Peter Anvin:
    "The kexec/kdump people have found several problems with the support
    for loading over 4 GiB that was introduced in this merge cycle. This
    is partly due to a number of design problems inherent in the way the
    various pieces of kdump fit together (it is pretty horrifically manual
    in many places.)

    After a *lot* of iterations this is the patchset that was agreed upon,
    but of course it is now very late in the cycle. However, because it
    changes both the syntax and semantics of the crashkernel option, it
    would be desirable to avoid a stable release with the broken
    interfaces."

    I'm not happy with the timing, since originally the plan was to release
    the final 3.9 tomorrow. But apparently I'm doing an -rc8 instead...

    * 'x86-kdump-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    kexec: use Crash kernel for Crash kernel low
    x86, kdump: Change crashkernel_high/low= to crashkernel=,high/low
    x86, kdump: Retore crashkernel= to allocate under 896M
    x86, kdump: Set crashkernel_low automatically

    Linus Torvalds
     
  • Pull x86 fixes from Peter Anvin:
    "Three groups of fixes:

    1. Make sure we don't execute the early microcode patching if family
    < 6, since it would touch MSRs which don't exist on those
    families, causing crashes.

    2. The Xen partial emulation of HyperV can be dealt with more
    gracefully than just disabling the driver.

    3. More EFI variable space magic. In particular, variables hidden
    from runtime code need to be taken into account too."

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, microcode: Verify the family before dispatching microcode patching
    x86, hyperv: Handle Xen emulation of Hyper-V more gracefully
    x86,efi: Implement efi_no_storage_paranoia parameter
    efi: Export efi_query_variable_store() for efivars.ko
    x86/Kconfig: Make EFI select UCS2_STRING
    efi: Distinguish between "remaining space" and actually used space
    efi: Pass boot services variable info to runtime code
    Move utf16 functions to kernel core and rename
    x86,efi: Check max_size only if it is non-zero.
    x86, efivars: firmware bug workarounds should be in platform code

    Linus Torvalds
     
  • Pull ARM fixes from Russell King:
    "A set of fixes from various people - Will Deacon gets a prize for
    removing code this time around. The biggest fix in this lot is
    sorting out the ARM740T mess. The rest are relatively small fixes."

    * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
    ARM: 7699/1: sched_clock: Add more notrace to prevent recursion
    ARM: 7698/1: perf: fix group validation when using enable_on_exec
    ARM: 7697/1: hw_breakpoint: do not use __cpuinitdata for dbg_cpu_pm_nb
    ARM: 7696/1: Fix kexec by setting outer_cache.inv_all for Feroceon
    ARM: 7694/1: ARM, TCM: initialize TCM in paging_init(), instead of setup_arch()
    ARM: 7692/1: iop3xx: move IOP3XX_PERIPHERAL_VIRT_BASE
    ARM: modules: don't export cpu_set_pte_ext when !MMU
    ARM: mm: remove broken condition check for v4 flushing
    ARM: mm: fix numerous hideous errors in proc-arm740.S
    ARM: cache: remove ARMv3 support code
    ARM: tlbflush: remove ARMv3 support

    Linus Torvalds