02 Jun, 2014

1 commit

  • Pull MIPS fixes from Ralf Baechle:
    "A fair number of fixes across the field. Nothing terribly
    complicated; the one liners in below changelog should be fairly
    descriptive.

    Noteworthy is the SB1 change which the result of changes to binutils
    resulting in one big gas warning for most files being assembled as
    well as the asid_cache and branch emulation fixes which fix corruption
    or possible uninteded behaviour of kernel or application code. The
    remainder of fixes are more platforms or subsystem specific"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
    MIPS: R46000: Fix Micro-assembler field overflow for R4600 V2
    MIPS: ptrace: Avoid smp_processor_id() in preemptible code
    MIPS: Lemote 2F: cs5536: mfgpt: use raw locks
    MIPS: SB1: Fix excessive kernel warnings.
    MIPS: RC32434: fix broken PCI resource initialization
    MIPS: malta: memory.c: Initialize the 'memsize' variable
    MIPS: Fix typo when reporting cache and ftlb errors for ImgTec cores
    MIPS: Fix inconsistancy of __NR_Linux_syscalls value
    MIPS: Fix branch emulation of branch likely instructions.
    MIPS: Fix a typo error in AUDIT_ARCH definition
    MIPS: Change type of asid_cache to unsigned long

    Linus Torvalds
     

30 May, 2014

1 commit

  • Pull ARM fixes from Russell King:
    "The usual random collection of relatively small ARM fixes"

    * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
    ARM: 8063/1: bL_switcher: fix individual online status reporting of removed CPUs
    ARM: 8064/1: fix v7-M signal return
    ARM: 8057/1: amba: Add Qualcomm vendor ID.
    ARM: 8052/1: unwind: Fix handling of "Pop r4-r[4+nnn],r14" opcode
    ARM: 8051/1: put_user: fix possible data corruption in put_user
    ARM: 8048/1: fix v7-M setup stack location

    Linus Torvalds
     

28 May, 2014

1 commit

  • Pull slave-dmaengine fixes from Vinod Koul:
    "We have three small fixes.

    First one from Andy reverts the devm_request irq as we need to ensure
    the tasklet is killed after irq is freed, so we need to do free irq in
    our code. Other two from Arnd are fixing the compilation issue in
    omap and sa11x0 drivers with ARM randconfigs"

    * 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
    dmaengine: sa11x0: remove broken #ifdef
    dmaengine: omap: hide filter_fn for built-in drivers
    dmaengine: dw: went back to plain {request,free}_irq() calls

    Linus Torvalds
     

26 May, 2014

1 commit

  • This patch adds Qualcomm amba vendor Id to the list. This ID is used in mmci driver. The ID selected in same lines like 0x41 is "A" for ARM, 0x51 is "Q" for Qualcomm.

    As there are no physical register on Qcom SOC for amba vendor id, this is a fake ID assigned based on "Q" prefix from Qualcomm.

    Signed-off-by: Srinivas Kandagatla
    Acked-by: Linus Walleij
    Signed-off-by: Russell King

    srinik
     

24 May, 2014

5 commits

  • Pull dmaengine fixes from Dan Williams:
    "Two fixes for -stable:

    - async_mult() sometimes maps less buffers than initially requested.
    We end up freeing dmaengine_unmap_data on an invalid pool.

    - mv_xor: register write ordering fix"

    * tag 'dmaengine-fixes-3.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine:
    dmaengine: fix dmaengine_unmap failure
    dma: mv_xor: Flush descriptors before activating a channel

    Linus Torvalds
     
  • Pull networking fixes from David Miller:
    "It looks like a sizeble collection but this is nearly 3 weeks of bug
    fixing while you were away.

    1) Fix crashes over IPSEC tunnels with NAT, the latter can reroute
    the packet through a non-IPSEC protected path and the code has to
    be able to handle SKBs attached to routes lacking an attached xfrm
    state. From Steffen Klassert.

    2) Fix OOPSs in ipv4 and ipv6 ipsec layers for unsupported
    sub-protocols, also from Steffen Klassert.

    3) Set local_df on fragmented netfilter skbs otherwise we won't be
    able to forward successfully, from Florian Westphal.

    4) cdc_mbim ipv6 neighbour code does __vlan_find_dev_deep without
    holding RCU lock, from Bjorn Mork.

    5) local_df test in ip_may_fragment is inverted, from Florian
    Westphal.

    6) jme driver doesn't check for DMA mapping failures, from Neil
    Horman.

    7) qlogic driver doesn't calculate number of TX queues properly, from
    Shahed Shaikh.

    8) fib_info_cnt can drift irreversibly positive if we fail to
    allocate the fi->fib_metrics array, from Sergey Popovich.

    9) Fix use after free in ip6_route_me_harder(), also from Sergey
    Popovich.

    10) When SYSCTL is disabled, we don't handle local_port_range and
    ping_group_range defaults properly at all, from Cong Wang.

    11) Unaccelerated VLAN tagged frames improperly handled by cdc_mbim
    driver, fix from Bjorn Mork.

    12) cassini driver needs nested lock annotations for TX locking, from
    Emil Goode.

    13) On init error ipv6 VTI driver can unregister pernet ops twice,
    oops. Fix from Mahtias Krause.

    14) If macvlan device is down, don't propagate IFF_ALLMULTI changes,
    from Peter Christensen.

    15) Missing NULL pointer check while parsing netlink config options in
    ip6_tnl_validate(). From Susant Sahani.

    16) Fix handling of neighbour entries during ipv6 router reachability
    probing, from Duan Jiong.

    17) x86 and s390 JIT address randomization has some address
    calculation bugs leading to crashes, from Alexei Starovoitov and
    Heiko Carstens.

    18) Clear up those uglies with nop patching and net_get_random_once(),
    from Hannes Frederic Sowa.

    19) Option length miscalculated in ip6_append_data(), fix also from
    Hannes Frederic Sowa.

    20) A while ago we fixed a race during device unregistry when a
    namespace went down, turns out there is a second place that needs
    similar protection. From Cong Wang.

    21) In the new Altera TSE driver multicast filtering isn't working,
    disable it and just use promisc mode until the cause is found.
    From Vince Bridgers.

    22) When we disable router enabling in ipv6 we have to flush the
    cached routes explicitly, from Duan Jiong.

    23) NBMA tunnels should not cache routes on the tunnel object because
    the key is variable, from Timo Teräs.

    24) With stacked devices GRO information in skb->cb[] can be not setup
    properly, make sure it is in all code paths. From Eric Dumazet.

    25) Really fix stacked vlan locking, multiple levels of nesting with
    intervening non-vlan devices are possible. From Vlad Yasevich.

    26) Fallback ipip tunnel device's mtu is not setup properly, from
    Steffen Klassert.

    27) The packet scheduler's tcindex filter can crash because we
    structure copy objects with list_head's inside, oops. From Cong
    Wang.

    28) Fix CHECKSUM_COMPLETE handling for ipv6 GRE tunnels, from Eric
    Dumazet.

    29) In some configurations 'itag' in __mkroute_input() can end up
    being used uninitialized because of how fib_validate_source()
    works. Fix it by explitly initializing itag to zero like all the
    other fib_validate_source() callers do, from Li RongQing"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (116 commits)
    batman: fix a bogus warning from batadv_is_on_batman_iface()
    ipv4: initialise the itag variable in __mkroute_input
    bonding: Send ALB learning packets using the right source
    bonding: Don't assume 802.1Q when sending alb learning packets.
    net: doc: Update references to skb->rxhash
    stmmac: Remove unbalanced clk_disable call
    ipv6: gro: fix CHECKSUM_COMPLETE support
    net_sched: fix an oops in tcindex filter
    can: peak_pci: prevent use after free at netdev removal
    ip_tunnel: Initialize the fallback device properly
    vlan: Fix build error wth vlan_get_encap_level()
    can: c_can: remove obsolete STRICT_FRAME_ORDERING Kconfig option
    MAINTAINERS: Pravin Shelar is Open vSwitch maintainer.
    bnx2x: Convert return 0 to return rc
    bonding: Fix alb mode to only use first level vlans.
    bonding: Fix stacked device detection in arp monitoring
    macvlan: Fix lockdep warnings with stacked macvlan devices
    vlan: Fix lockdep warning with stacked vlan devices.
    net: Allow for more then a single subclass for netif_addr_lock
    net: Find the nesting level of a given device by type.
    ...

    Linus Torvalds
     
  • Pull scheduler fixes from Ingo Molnar:
    "The biggest commit is an irqtime accounting loop latency fix, the rest
    are misc fixes all over the place: deadline scheduling, docs, numa,
    balancer and a bad to-idle latency fix"

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    sched/numa: Initialize newidle balance stats in sd_numa_init()
    sched: Fix updating rq->max_idle_balance_cost and rq->next_balance in idle_balance()
    sched: Skip double execution of pick_next_task_fair()
    sched: Use CPUPRI_NR_PRIORITIES instead of MAX_RT_PRIO in cpupri check
    sched/deadline: Fix memory leak
    sched/deadline: Fix sched_yield() behavior
    sched: Sanitize irq accounting madness
    sched/docbook: Fix 'make htmldocs' warnings caused by missing description

    Linus Torvalds
     
  • Pull perf fixes from Ingo Molnar:
    "The biggest changes are fixes for races that kept triggering Trinity
    crashes, plus liblockdep build fixes and smaller misc fixes.

    The liblockdep bits in perf/urgent are a pull mistake - they should
    have been in locking/urgent - but by the time I noticed other commits
    were added and testing was done :-/ Sorry about that"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf: Fix a race between ring_buffer_detach() and ring_buffer_attach()
    perf: Prevent false warning in perf_swevent_add
    perf: Limit perf_event_attr::sample_period to 63 bits
    tools/liblockdep: Remove all build files when doing make clean
    tools/liblockdep: Build liblockdep from tools/Makefile
    perf/x86/intel: Fix Silvermont's event constraints
    perf: Fix perf_event_init_context()
    perf: Fix race in removing an event

    Linus Torvalds
     
  • In commit ad86622b478e ("wait: swap EXIT_ZOMBIE and EXIT_DEAD to hide
    EXIT_TRACE from user-space") the order of task state definitions were
    changed: EXIT_DEAD and EXIT_ZOMBIE were swapped. Though the charterers
    for the states in TASK_STATE_TO_CHAR_STR string were not updated. This
    patch synchronizes the string to the order of definitions.

    Signed-off-by: Masatake YAMATO
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masatake YAMATO
     

22 May, 2014

3 commits

  • Missing a "|" in AUDIT_ARCH_MIPSEL64N32 macro definition.

    Signed-off-by: Huacai Chen
    Reviewed-by: Markos Chandras
    Cc: John Crispin
    Cc: Steven J. Hill
    Cc: Aurelien Jarno
    Cc: linux-mips@linux-mips.org
    Cc: Fuxin Zhang
    Cc: Zhangjin Wu
    Patchwork: https://patchwork.linux-mips.org/patch/6978/
    Signed-off-by: Ralf Baechle

    Huacai Chen
     
  • The count which is used to get_unmap_data maybe not the same as the
    count computed in dmaengine_unmap which causes to free data in a
    wrong pool.

    This patch fixes this issue by keeping the map count with unmap_data
    structure and use this count to get the pool.

    Cc:
    Signed-off-by: Xuelin Shi
    Signed-off-by: Dan Williams

    Xuelin Shi
     
  • Pull renameat2 arch support from Miklos Szeredi:
    "I've collected architecture patches for the renameat2 syscall that
    maintainers acked and/or asked me to queue.

    This adds architecture support for the renameat2 syscall to m68k,
    parisc, ia64 and through asm-generic to arc, arm64, c6x, hexagon,
    metag, openrisc, score, tile, unicore32"

    * 'renameat2' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
    scripts/checksyscalls.sh: Make renameat optional
    asm-generic: Add renameat2 syscall
    ia64: add renameat2 syscall
    parisc: add renameat2 syscall
    m68k: add renameat2 syscall

    Linus Torvalds
     

21 May, 2014

4 commits

  • Pull driver core fixes from Greg KH:
    "Here are two driver core (well, sysfs) fixes for 3.15-rc6 that resolve
    some reported issues and a regression from 3.13"

    * tag 'driver-core-3.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    sysfs: make sure read buffer is zeroed
    kernfs, sysfs, cgroup: restrict extra perm check on open to sysfs

    Linus Torvalds
     
  • Pull more cgroup fixes from Tejun Heo:
    "Three more patches to fix cgroup_freezer breakage due to the recent
    cgroup internal locking changes - an operation cgroup_freezer was
    using now requires sleepable context and cgroup_freezer was invoking
    that while holding a spin lock. cgroup_freezer was using an overly
    elaborate hierarchical locking scheme.

    While it's possible to convert the hierarchical spinlocks directly to
    mutexes, this patch simplifies the overall locking so that it uses a
    global mutex. This has the added benefit of avoiding iterating
    potentially huge number of tasks under a spinlock. While the patch is
    on the larger side in the devel cycle, the changes made are mostly
    straight-forward and the locking logic is a lot simpler afterwards"

    * 'for-3.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
    cgroup: fix rcu_read_lock() leak in update_if_frozen()
    cgroup_freezer: replace freezer->lock with freezer_mutex
    cgroup: introduce task_css_is_root()

    Linus Torvalds
     
  • Pull device tree fixes from Grant Likely:
    "Drivercore bugfixes for v3.15

    This branch contains bug fixes important to get into v3.15. There is
    a fix for modifying properties seen during early boot, a fix for an
    incorrect prototype when CONFIG_OF=n, and a couple of corrections to
    device tree memory nodes on a few platforms"

    * tag 'dt-for-linus' of git://git.secretlab.ca/git/linux:
    mips: dts: Fix missing device_type="memory" property in memory nodes
    arm: dts: Fix missing device_type="memory" for ste-ccu8540
    of: fix CONFIG_OF=n prototype of of_node_full_name()
    of: make of_update_property() usable earlier in the boot process

    Linus Torvalds
     
  • It is not possible to reference the omap_dma_filter_fn filter
    function from a built-in driver if the dmaengine driver itself
    is a loadable module, which is a valid configuration otherwise.

    This provides only the dummy alternative if the function
    is referenced by a built-in driver to allow a successful
    build. The filter function is only required by ATAGS based
    platforms, which will continue to be broken after this change
    for the bogus configuration. When booting from DT, with the
    dma channels correctly listed there, it will work fine.

    Signed-off-by: Arnd Bergmann
    Acked-by: Tony Lindgren
    Cc: Russell King
    Cc: Vinod Koul
    Cc: dmaengine@vger.kernel.org
    Signed-off-by: Vinod Koul

    Arnd Bergmann
     

20 May, 2014

5 commits

  • The new function vlan_get_encap_level() uses vlan_dev_priv()
    which is only conditionally avaialble when VLAN support is
    enabled. Make vlan_get_encap_level() conditionally available
    as well.

    Fixes: 44a4085538c8 ("bonding: Fix stacked device detection in arp monitoring")
    Reported-by: Stephen Rothwell
    CC: Stephen Rothwell
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • Add the renameat2 syscall to the generic syscall list, which is used by the
    following architectures: arc, arm64, c6x, hexagon, metag, openrisc, score,
    tile, unicore32.

    Signed-off-by: James Hogan
    Acked-by: Arnd Bergmann
    Signed-off-by: Miklos Szeredi
    Cc: linux-arch@vger.kernel.org
    Cc: Vineet Gupta
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Mark Salter
    Cc: Aurelien Jacquiot
    Cc: Richard Kuo
    Cc: linux-hexagon@vger.kernel.org
    Cc: linux-metag@vger.kernel.org
    Cc: Jonas Bonn
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Chris Metcalf
    Cc: Guan Xuetao

    James Hogan
     
  • Pull MIPS fixes from Ralf Baechle:
    "MIPS fixes for various loose ends:

    - Fix workarounds for R4000 erratum.
    - Patch up DEC, Siemens-Nixdorf and Loongson hardware support.
    - Wire up renameat2 syscall.
    - Delete unused file - it was causing false warnings from maintenance
    scripts.
    - Revert a patch because it's functionality is now implemented twice
    which causes superfluous /proc/cpuinfo output.
    - Fix a microMIPS regression"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
    MIPS: mm: Fix broken microMIPS kernel regression.
    MIPS: Add new AUDIT_ARCH token for the N32 ABI on MIPS64
    MIPS: Wire up renameat2 syscall.
    MIPS: inst.h: Rename BITFIELD_FIELD to __BITFIELD_FIELD.
    MIPS: Remove file missed when removing rm9k support a while ago.
    MIPS/loongson2_cpufreq: Fix CPU clock rate setting
    MIPS: Loongson: No need to select GENERIC_HARDIRQS_NO__DO_IRQ
    MIPS: csum_partial.S CPU_DADDI_WORKAROUNDS bug fix
    MIPS: __strncpy_from_user_asm CPU_DADDI_WORKAROUNDS bug fix
    MIPS: __delay CPU_DADDI_WORKAROUNDS bug fix
    MIPS: DEC/SNI: O32 wrapper stack switching fixes
    MIPS: DEC: Bus error handler fixes
    MAINTAINERS: TURBOchannel: Update entry
    Revert "MIPS: MT: proc: Add support for printing VPE and TC ids"

    Linus Torvalds
     
  • Pull Metag architecture and related fixes from James Hogan:
    "Mostly fixes for metag and parisc relating to upgrowing stacks.

    - Fix missing compiler barriers in metag memory barriers.
    - Fix BUG_ON on metag when RLIMIT_STACK hard limit is increased
    beyond safe value.
    - Make maximum stack size configurable. This reduces the default
    user stack size back to 80MB (especially on parisc after their
    removal of _STK_LIM_MAX override). This only affects metag and
    parisc.
    - Remove metag _STK_LIM_MAX override to match other arches and follow
    parisc, now that it is safe to do so (due to the BUG_ON fix
    mentioned above).
    - Finally now that both metag and parisc _STK_LIM_MAX overrides have
    been removed, it makes sense to remove _STK_LIM_MAX altogether"

    * tag 'metag-for-v3.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag:
    asm-generic: remove _STK_LIM_MAX
    metag: Remove _STK_LIM_MAX override
    parisc,metag: Do not hardcode maximum userspace stack size
    metag: Reduce maximum stack size to 256MB
    metag: fix memory barriers

    Linus Torvalds
     
  • Pull irq fixes from Thomas Gleixner:
    "Two small updates from the irq departement:

    - Provide missing inline stub for a SMP only function

    - Add sub-maintainer for the drivers/irqchip/ part of the irq
    subsystem. YAY!"

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    MAINTAINERS: Add co-maintainer for drivers/irqchip
    genirq: Provide irq_force_affinity fallback for non-SMP

    Linus Torvalds
     

19 May, 2014

1 commit

  • Alexander noticed that we use RCU iteration on rb->event_list but do
    not use list_{add,del}_rcu() to add,remove entries to that list, nor
    do we observe proper grace periods when re-using the entries.

    Merge ring_buffer_detach() into ring_buffer_attach() such that
    attaching to the NULL buffer is detaching.

    Furthermore, ensure that between any 'detach' and 'attach' of the same
    event we observe the required grace period, but only when strictly
    required. In effect this means that only ioctl(.request =
    PERF_EVENT_IOC_SET_OUTPUT) will wait for a grace period, while the
    normal initial attach and final detach will not be delayed.

    This patch should, I think, do the right thing under all
    circumstances, the 'normal' cases all should never see the extra grace
    period, but the two cases:

    1) PERF_EVENT_IOC_SET_OUTPUT on an event which already has a
    ring_buffer set, will now observe the required grace period between
    removing itself from the old and attaching itself to the new buffer.

    This case is 'simple' in that both buffers are present in
    perf_event_set_output() one could think an unconditional
    synchronize_rcu() would be sufficient; however...

    2) an event that has a buffer attached, the buffer is destroyed
    (munmap) and then the event is attached to a new/different buffer
    using PERF_EVENT_IOC_SET_OUTPUT.

    This case is more complex because the buffer destruction does:
    ring_buffer_attach(.rb = NULL)
    followed by the ioctl() doing:
    ring_buffer_attach(.rb = foo);

    and we still need to observe the grace period between these two
    calls due to us reusing the event->rb_entry list_head.

    In order to make 2 happen we use Paul's latest cond_synchronize_rcu()
    call.

    Cc: Paul Mackerras
    Cc: Stephane Eranian
    Cc: Andi Kleen
    Cc: "Paul E. McKenney"
    Cc: Ingo Molnar
    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Reported-by: Alexander Shishkin
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20140507123526.GD13658@twins.programming.kicks-ass.net
    Signed-off-by: Thomas Gleixner

    Peter Zijlstra
     

17 May, 2014

7 commits

  • Prior to commit fbd929f2dce460456807a51e18d623db3db9f077
    bonding: support QinQ for bond arp interval

    the arp monitoring code allowed for proper detection of devices
    stacked on top of vlans. Since the above commit, the
    code can still detect a device stacked on top of single
    vlan, but not a device stacked on top of Q-in-Q configuration.
    The search will only set the inner vlan tag if the route
    device is the vlan device. However, this is not always the
    case, as it is possible to extend the stacked configuration.

    With this patch it is possible to provision devices on
    top Q-in-Q vlan configuration that should be used as
    a source of ARP monitoring information.

    For example:
    ip link add link bond0 vlan10 type vlan proto 802.1q id 10
    ip link add link vlan10 vlan100 type vlan proto 802.1q id 100
    ip link add link vlan100 type macvlan

    Note: This patch limites the number of stacked VLANs to 2,
    just like before. The original, however had another issue
    in that if we had more then 2 levels of VLANs, we would end
    up generating incorrectly tagged traffic. This is no longer
    possible.

    Fixes: fbd929f2dce460456807a51e18d623db3db9f077 (bonding: support QinQ for bond arp interval)
    CC: Jay Vosburgh
    CC: Veaceslav Falico
    CC: Andy Gospodarek
    CC: Ding Tianhong
    CC: Patric McHardy
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • Macvlan devices try to avoid stacking, but that's not always
    successfull or even desired. As an example, the following
    configuration is perefectly legal and valid:

    eth0 ] dev_uc_sync+0x3c/0x80
    [ 115.620686]
    but task is already holding lock:
    [ 115.620723] (&macvlan_netdev_addr_lock_key){+.....}, at: [] dev_set_rx_mode+0x1e/0x40
    [ 115.620795]
    which lock already depends on the new lock.

    [ 115.620853]
    the existing dependency chain (in reverse order) is:
    [ 115.620894]
    -> #1 (&macvlan_netdev_addr_lock_key){+.....}:
    [ 115.620935] [] lock_acquire+0xa2/0x130
    [ 115.620974] [] _raw_spin_lock_nested+0x37/0x50
    [ 115.621019] [] vlan_dev_set_rx_mode+0x53/0x110 [8021q]
    [ 115.621066] [] __dev_set_rx_mode+0x57/0xa0
    [ 115.621105] [] dev_set_rx_mode+0x26/0x40
    [ 115.621143] [] __dev_open+0xde/0x140
    [ 115.621174] [] __dev_change_flags+0x9d/0x170
    [ 115.621174] [] dev_change_flags+0x29/0x60
    [ 115.621174] [] do_setlink+0x321/0x9a0
    [ 115.621174] [] rtnl_newlink+0x51f/0x730
    [ 115.621174] [] rtnetlink_rcv_msg+0x95/0x250
    [ 115.621174] [] netlink_rcv_skb+0xa9/0xc0
    [ 115.621174] [] rtnetlink_rcv+0x2a/0x40
    [ 115.621174] [] netlink_unicast+0xf0/0x1c0
    [ 115.621174] [] netlink_sendmsg+0x2ff/0x740
    [ 115.621174] [] sock_sendmsg+0x8b/0xc0
    [ 115.621174] [] ___sys_sendmsg+0x369/0x380
    [ 115.621174] [] __sys_sendmsg+0x42/0x80
    [ 115.621174] [] SyS_sendmsg+0x12/0x20
    [ 115.621174] [] system_call_fastpath+0x16/0x1b
    [ 115.621174]
    -> #0 (&vlan_netdev_addr_lock_key/1){+.....}:
    [ 115.621174] [] __lock_acquire+0x1773/0x1a60
    [ 115.621174] [] lock_acquire+0xa2/0x130
    [ 115.621174] [] _raw_spin_lock_nested+0x37/0x50
    [ 115.621174] [] dev_uc_sync+0x3c/0x80
    [ 115.621174] [] macvlan_set_mac_lists+0xca/0x110 [macvlan]
    [ 115.621174] [] __dev_set_rx_mode+0x57/0xa0
    [ 115.621174] [] dev_set_rx_mode+0x26/0x40
    [ 115.621174] [] __dev_open+0xde/0x140
    [ 115.621174] [] __dev_change_flags+0x9d/0x170
    [ 115.621174] [] dev_change_flags+0x29/0x60
    [ 115.621174] [] do_setlink+0x321/0x9a0
    [ 115.621174] [] rtnl_newlink+0x51f/0x730
    [ 115.621174] [] rtnetlink_rcv_msg+0x95/0x250
    [ 115.621174] [] netlink_rcv_skb+0xa9/0xc0
    [ 115.621174] [] rtnetlink_rcv+0x2a/0x40
    [ 115.621174] [] netlink_unicast+0xf0/0x1c0
    [ 115.621174] [] netlink_sendmsg+0x2ff/0x740
    [ 115.621174] [] sock_sendmsg+0x8b/0xc0
    [ 115.621174] [] ___sys_sendmsg+0x369/0x380
    [ 115.621174] [] __sys_sendmsg+0x42/0x80
    [ 115.621174] [] SyS_sendmsg+0x12/0x20
    [ 115.621174] [] system_call_fastpath+0x16/0x1b
    [ 115.621174]
    other info that might help us debug this:

    [ 115.621174] Possible unsafe locking scenario:

    [ 115.621174] CPU0 CPU1
    [ 115.621174] ---- ----
    [ 115.621174] lock(&macvlan_netdev_addr_lock_key);
    [ 115.621174] lock(&vlan_netdev_addr_lock_key/1);
    [ 115.621174] lock(&macvlan_netdev_addr_lock_key);
    [ 115.621174] lock(&vlan_netdev_addr_lock_key/1);
    [ 115.621174]
    *** DEADLOCK ***

    [ 115.621174] 2 locks held by ip/1704:
    [ 115.621174] #0: (rtnl_mutex){+.+.+.}, at: [] rtnetlink_rcv+0x1b/0x40
    [ 115.621174] #1: (&macvlan_netdev_addr_lock_key){+.....}, at: [] dev_set_rx_mode+0x1e/0x40
    [ 115.621174]
    stack backtrace:
    [ 115.621174] CPU: 3 PID: 1704 Comm: ip Not tainted 3.15.0-rc1+ #24
    [ 115.621174] Hardware name: Hewlett-Packard HP xw8400 Workstation/0A08h, BIOS 786D5 v02.38 10/25/2010
    [ 115.621174] ffffffff82339ae0 ffff880465f79568 ffffffff816ee20c ffffffff82339ae0
    [ 115.621174] ffff880465f795a8 ffffffff816e9e1b ffff880465f79600 ffff880465b019c8
    [ 115.621174] 0000000000000001 0000000000000002 ffff880465b019c8 ffff880465b01230
    [ 115.621174] Call Trace:
    [ 115.621174] [] dump_stack+0x4d/0x66
    [ 115.621174] [] print_circular_bug+0x200/0x20e
    [ 115.621174] [] __lock_acquire+0x1773/0x1a60
    [ 115.621174] [] ? trace_hardirqs_on_caller+0xb2/0x1d0
    [ 115.621174] [] lock_acquire+0xa2/0x130
    [ 115.621174] [] ? dev_uc_sync+0x3c/0x80
    [ 115.621174] [] _raw_spin_lock_nested+0x37/0x50
    [ 115.621174] [] ? dev_uc_sync+0x3c/0x80
    [ 115.621174] [] dev_uc_sync+0x3c/0x80
    [ 115.621174] [] macvlan_set_mac_lists+0xca/0x110 [macvlan]
    [ 115.621174] [] __dev_set_rx_mode+0x57/0xa0
    [ 115.621174] [] dev_set_rx_mode+0x26/0x40
    [ 115.621174] [] __dev_open+0xde/0x140
    [ 115.621174] [] __dev_change_flags+0x9d/0x170
    [ 115.621174] [] dev_change_flags+0x29/0x60
    [ 115.621174] [] ? mem_cgroup_bad_page_check+0x21/0x30
    [ 115.621174] [] do_setlink+0x321/0x9a0
    [ 115.621174] [] ? __lock_acquire+0x37c/0x1a60
    [ 115.621174] [] rtnl_newlink+0x51f/0x730
    [ 115.621174] [] ? rtnl_newlink+0xe9/0x730
    [ 115.621174] [] rtnetlink_rcv_msg+0x95/0x250
    [ 115.621174] [] ? trace_hardirqs_on+0xd/0x10
    [ 115.621174] [] ? rtnetlink_rcv+0x1b/0x40
    [ 115.621174] [] ? rtnetlink_rcv+0x40/0x40
    [ 115.621174] [] netlink_rcv_skb+0xa9/0xc0
    [ 115.621174] [] rtnetlink_rcv+0x2a/0x40
    [ 115.621174] [] netlink_unicast+0xf0/0x1c0
    [ 115.621174] [] netlink_sendmsg+0x2ff/0x740
    [ 115.621174] [] sock_sendmsg+0x8b/0xc0
    [ 115.621174] [] ? might_fault+0x5f/0xb0
    [ 115.621174] [] ? might_fault+0xa8/0xb0
    [ 115.621174] [] ? might_fault+0x5f/0xb0
    [ 115.621174] [] ? verify_iovec+0x5e/0xe0
    [ 115.621174] [] ___sys_sendmsg+0x369/0x380
    [ 115.621174] [] ? __do_page_fault+0x11d/0x570
    [ 115.621174] [] ? up_read+0x1f/0x40
    [ 115.621174] [] ? __do_page_fault+0x214/0x570
    [ 115.621174] [] ? mntput_no_expire+0x6b/0x1c0
    [ 115.621174] [] ? mntput_no_expire+0x17/0x1c0
    [ 115.621174] [] ? mntput+0x24/0x40
    [ 115.621174] [] __sys_sendmsg+0x42/0x80
    [ 115.621174] [] SyS_sendmsg+0x12/0x20
    [ 115.621174] [] system_call_fastpath+0x16/0x1b

    Fix this by correctly providing macvlan lockdep class.

    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • This reverts commit dc8eaaa006350d24030502a4521542e74b5cb39f.
    vlan: Fix lockdep warning when vlan dev handle notification

    Instead we use the new new API to find the lock subclass of
    our vlan device. This way we can support configurations where
    vlans are interspersed with other devices:
    bond -> vlan -> macvlan -> vlan

    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • Currently netif_addr_lock_nested assumes that there can be only
    a single nesting level between 2 devices. However, if we
    have multiple devices of the same type stacked, this fails.
    For example:
    eth0
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • Multiple devices in the kernel can be stacked/nested and they
    need to know their nesting level for the purposes of lockdep.
    This patch provides a generic function that determines a nesting
    level of a particular device by its type (ex: vlan, macvlan, etc).
    We only care about nesting of the same type of devices.

    For example:
    eth0
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • John W. Linville says:

    ====================
    pull request: wireless 2014-05-15

    Please pull this batch of fixes for the 3.15 stream...

    For the mac80211 bits, Johannes says:

    "One fix is to get better VHT performance and the other fixes tracing
    garbage or other potential issues with the interface name tracing."

    And...

    "This has a fix from Emmanuel for a problem I failed to fix - when
    association is in progress then it needs to be cancelled while
    suspending (I had fixed the same for authentication). Also included a
    fix from myself for a userspace API problem that hit the iw tool and a
    fix to the remain-on-channel framework."

    For the iwlwifi bits, Emmanuel says:

    "Alex fixes the scan by disabling the fragmented scan. David prevents
    scan offload while associated, the firmware seems not to like it. I
    fix a stupid bug I made in BT Coex, and fix a bad #ifdef clause in rate
    scaling. Along with that there is a fix for a NULL pointer exception
    that can happen if we load the driver and our ISR gets called because
    the interrupt line is shared. The fix has been tested by the reporter."

    And...

    "We have here a fix from David Spinadel that makes a previous fix more
    complete, and an off-by-one issue fixed by Eliad in the same area.
    I fix the monitor that broke on the way."

    Beyond that...

    Daniel Kim's one-liner fixes a brcmfmac regression caused by a typo
    in an earlier commit..

    Rajkumar Manoharan fixes an ath9k oops reported by David Herrmann.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This patch adds UPDATE_QP SRIOV wrapper support.

    The mechanism is a general one, but currently only source MAC
    index changes are allowed for VFs.

    Signed-off-by: Matan Barak
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Matan Barak
     

16 May, 2014

2 commits

  • RFC 4861 states in 7.2.5:

    The IsRouter flag in the cache entry MUST be set based on the
    Router flag in the received advertisement. In those cases
    where the IsRouter flag changes from TRUE to FALSE as a result
    of this update, the node MUST remove that router from the
    Default Router List and update the Destination Cache entries
    for all destinations using that neighbor as a router as
    specified in Section 7.3.3. This is needed to detect when a
    node that is used as a router stops forwarding packets due to
    being configured as a host.

    Currently, when dealing with NA Message which IsRouter flag changes from
    TRUE to FALSE, the kernel only removes router from the Default Router List,
    and don't update the Destination Cache entries.

    Now in order to update those Destination Cache entries, i introduce
    function rt6_clean_tohost().

    Signed-off-by: Duan Jiong
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Duan Jiong
     
  • From: Cong Wang

    commit 50624c934db18ab90 (net: Delay default_device_exit_batch until no
    devices are unregistering) introduced rtnl_lock_unregistering() for
    default_device_exit_batch(). Same race could happen we when rmmod a driver
    which calls rtnl_link_unregister() as we call dev->destructor without rtnl
    lock.

    For long term, I think we should clean up the mess of netdev_run_todo()
    and net namespce exit code.

    Cc: Eric W. Biederman
    Cc: David S. Miller
    Signed-off-by: Cong Wang
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Cong Wang
     

15 May, 2014

4 commits


14 May, 2014

2 commits

  • net_get_random_once depends on the static keys infrastructure to patch up
    the branch to the slow path during boot. This was realized by abusing the
    static keys api and defining a new initializer to not enable the call
    site while still indicating that the branch point should get patched
    up. This was needed to have the fast path considered likely by gcc.

    The static key initialization during boot up normally walks through all
    the registered keys and either patches in ideal nops or enables the jump
    site but omitted that step on x86 if ideal nops where already placed at
    static_key branch points. Thus net_get_random_once branches not always
    became active.

    This patch switches net_get_random_once to the ordinary static_key
    api and thus places the kernel fast path in the - by gcc considered -
    unlikely path. Microbenchmarks on Intel and AMD x86-64 showed that
    the unlikely path actually beats the likely path in terms of cycle cost
    and that different nop patterns did not make much difference, thus this
    switch should not be noticeable.

    Fixes: a48e42920ff38b ("net: introduce new macro net_get_random_once")
    Reported-by: Tuomas Räsänen
    Cc: Linus Torvalds
    Signed-off-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Hannes Frederic Sowa
     
  • A MIPS64 kernel may support ELF files for all 3 MIPS ABIs
    (O32, N32, N64). Furthermore, the AUDIT_ARCH_MIPS{,EL}64 token
    does not provide enough information about the ABI for the 64-bit
    process. As a result of which, userland needs to use complex
    seccomp filters to decide whether a syscall belongs to the o32 or n32
    or n64 ABI. Therefore, a new arch token for MIPS64/n32 is added so it
    can be used by seccomp to explicitely set syscall filters for this ABI.

    Signed-off-by: Markos Chandras
    Acked-by: Eric Paris
    Acked-by: Paul Moore
    Cc: Andy Lutomirski
    Cc: Ralf Baechle
    Cc: Andy Lutomirski
    Cc: linux-mips@linux-mips.org
    Link: http://sourceforge.net/p/libseccomp/mailman/message/32239040/
    Patchwork: https://patchwork.linux-mips.org/patch/6818/
    Signed-off-by: Ralf Baechle

    Markos Chandras
     

13 May, 2014

3 commits

  • Determining the css of a task usually requires RCU read lock as that's
    the only thing which keeps the returned css accessible till its
    reference is acquired; however, testing whether a task belongs to the
    root can be performed without dereferencing the returned css by
    comparing the returned pointer against the root one in init_css_set[]
    which never changes.

    Implement task_css_is_root() which can be invoked in any context.
    This will be used by the scheduled cgroup_freezer change.

    v2: cgroup no longer supports modular controllers. No need to export
    init_css_set. Pointed out by Li.

    Signed-off-by: Tejun Heo
    Acked-by: Li Zefan

    Tejun Heo
     
  • My commit removing that also removed it from the header file
    which can break compilation of userspace that needed it, add
    it back for API/ABI compatibility purposes (but no code to
    implement anything for it.)

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • The kernfs open method - kernfs_fop_open() - inherited extra
    permission checks from sysfs. While the vfs layer allows ignoring the
    read/write permissions checks if the issuer has CAP_DAC_OVERRIDE,
    sysfs explicitly denied open regardless of the cap if the file doesn't
    have any of the UGO perms of the requested access or doesn't implement
    the requested operation. It can be debated whether this was a good
    idea or not but the behavior is too subtle and dangerous to change at
    this point.

    After cgroup got converted to kernfs, this extra perm check also got
    applied to cgroup breaking libcgroup which opens write-only files with
    O_RDWR as root. This patch gates the extra open permission check with
    a new flag KERNFS_ROOT_EXTRA_OPEN_PERM_CHECK and enables it for sysfs.
    For sysfs, nothing changes. For cgroup, root now can perform any
    operation regardless of the permissions as it was before kernfs
    conversion. Note that kernfs still fails unimplemented operations
    with -EINVAL.

    While at it, add comments explaining KERNFS_ROOT flags.

    Signed-off-by: Tejun Heo
    Reported-by: Andrey Wagin
    Tested-by: Andrey Wagin
    Cc: Li Zefan
    References: http://lkml.kernel.org/g/CANaxB-xUm3rJ-Cbp72q-rQJO5mZe1qK6qXsQM=vh0U8upJ44+A@mail.gmail.com
    Fixes: 2bd59d48ebfb ("cgroup: convert to kernfs")
    Signed-off-by: Greg Kroah-Hartman

    Tejun Heo