29 Sep, 2013

2 commits


28 Sep, 2013

6 commits

  • Pull hwmon fix from Guenter Roeck:
    "Fix potential crash condition in applesmc driver"

    * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
    hwmon: (applesmc) Check key count before proceeding

    Linus Torvalds
     
  • Pull sound fixes from Takashi Iwai:
    "Nothing too serious here: a couple of compress-offload core fixes,
    Haswell HDMI audio fix, a fixup for new MacBook Airs and a few COEF
    setups for ALC283 mic problems"

    * tag 'sound-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: hda - Enable internal mic on a Thinkpad machine with ALC283
    ALSA: hda - Fix Internal Mic boost can't control with ALC283
    ALSA: hda - Add documentation for CS4208 fixups
    ALSA: hda - Add fixup for MacBook Air 6,1 and 6,2 with CS4208 codec
    ALSA : hda - not use assigned converters for all unused pins
    ALSA: compress: Make sure we trigger STOP before closing the stream.
    ALSA: compress: Fix compress device unregister.

    Linus Torvalds
     
  • Pull fbdev fixes from Tomi Valkeinen:
    "Small fbdev fixes for various fb drivers"

    * tag 'fbdev-fixes-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
    video: mxsfb: Add missing break
    video: of: display_timing: correct display-timings node finding
    neofb: fix error return code in neofb_probe()
    s3fb: fix error return code in s3_pci_probe()
    video: mmp: drop needless devm cleanup
    OMAPDSS: Add missing dependency on backlight for DSI-CM panel drier
    OMAPDSS: DISPC: set irq_safe for runtime PM
    OMAPDSS: Return right error during connector probe

    Linus Torvalds
     
  • Pull reiserfs and UDF fixes from Jan Kara:
    "The contains fix of an UDF oops when mounting corrupted media and a
    fix of a race in reiserfs leading to oops"

    * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
    reiserfs: fix race with flush_used_journal_lists and flush_journal_list
    reiserfs: remove useless flush_old_journal_lists
    udf: Fortify LVID loading

    Linus Torvalds
     
  • In kobj_ns_current_may_mount the default should be to allow the mount.
    The test is only for a single kobj_ns_type at a time, and unless there
    is a reason to prevent it the mounting sysfs should be allowed.
    Subsystems that are not registered can't have are not involved so can't
    have a reason to prevent mounting sysfs.

    This is a bug-fix to commit 7dc5dbc879bd ("sysfs: Restrict mounting
    sysfs") that came in via the userns tree during the 3.12 merge window.

    Reported-and-tested-by: James Hogan
    Signed-off-by: "Eric W. Biederman"
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • The 64-bit cmpxchg operation on the lockref is ordered by virtue of
    hazarding between the cmpxchg operation and the reference count
    manipulation. On weakly ordered memory architectures (such as ARM), it
    can be of great benefit to omit the barrier instructions where they are
    not needed.

    This patch moves the lockless lockref code over to a cmpxchg64_relaxed
    operation, which doesn't provide barrier semantics. If the operation
    isn't defined, we simply #define it as the usual 64-bit cmpxchg macro.

    Cc: Waiman Long
    Signed-off-by: Will Deacon
    Signed-off-by: Linus Torvalds

    Will Deacon
     

27 Sep, 2013

4 commits


26 Sep, 2013

17 commits

  • Add missing break into the restore function.

    Signed-off-by: Marek Vasut
    Cc: Fabio Estevam
    Cc: Shawn Guo
    Cc: Tomi Valkeinen
    Signed-off-by: Tomi Valkeinen

    Marek Vasut
     
  • After reports from Chris and Josh Boyer of a rare crash in applesmc,
    Guenter pointed at the initialization problem fixed below. The patch
    has not been verified to fix the crash, but should be applied
    regardless.

    Reported-by:
    Suggested-by: Guenter Roeck
    Signed-off-by: Henrik Rydberg
    Cc: stable@vger.kernel.org
    Signed-off-by: Guenter Roeck

    Henrik Rydberg
     
  • of_get_display_timing(s) use of_find_node_by_name
    to get child node, this is incorrect, of_get_child_by_name
    should be used instead. The patch fixes it.
    Small typo is also corrected.

    Signed-off-by: Andrzej Hajda
    Signed-off-by: Kyungmin Park
    Signed-off-by: Tomi Valkeinen

    Andrzej Hajda
     
  • Fix to return a negative error code from the error handling
    case instead of 0, as done elsewhere in this function.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Tomi Valkeinen

    Wei Yongjun
     
  • Fix to return -EINVAL when virtual vertical size smaller than real
    instead of 0, as done elsewhere in this function. Also remove dup code.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Tomi Valkeinen

    Wei Yongjun
     
  • The nice thing about devm_* is that the driver doesn't need to free the
    resources but the driver core takes care about that. This also
    simplifies the error path quite a bit and removes the wrong check for a
    clock pointer being NULL.

    Russell King - ARM Linux :
    "And this patch also fixes the above: disabling/unpreparing _after_ putting
    the thing - which was quite silly... :)"

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Tomi Valkeinen

    Uwe Kleine-König
     
  • The DSI-CM driver uses the backlight class so needs to build depend on it.

    Signed-off-by: Mark Brown
    Reviewed-by: Jingoo Han
    Signed-off-by: Tomi Valkeinen

    Mark Brown
     
  • BIOS can mark a pin as "no physical connection" if the port is used by an
    integrated display which is not audio capable. And audio driver will overlook
    such pins.

    On Haswell, such a disconneted pin will keep muted and connected to the 1st
    converter by default. But if the 1st convertor is assigned to a connected pin
    for audio streaming. The muted disconnected pin can make the connected pin
    no sound output.

    So this patch avoids using assigned converters for all unused pins for Haswell,
    including the disconected pins.

    Signed-off-by: Mengdong Lin
    Reviewed-by: David Henningsson
    Signed-off-by: Takashi Iwai

    Mengdong Lin
     
  • Currently we assume that userspace will shut down the compressed stream
    correctly. However, if userspcae dies (e.g. cplay & ctrl-C) we dont
    stop the stream before freeing it.

    This now checks that the stream is stopped before freeing.

    Signed-off-by: Liam Girdwood
    Signed-off-by: Takashi Iwai

    Liam Girdwood
     
  • Pull Xen fixes from Konrad Rzeszutek Wilk:
    "Bug-fixes and one update to the kernel-paramters.txt documentation.

    - Fix PV spinlocks triggering jump_label code bug
    - Remove extraneous code in the tpm front driver
    - Fix ballooning out of pages when non-preemptible
    - Fix deadlock when using a 32-bit initial domain with large amount
    of memory
    - Add xen_nopvpsin parameter to the documentation"

    * tag 'stable/for-linus-3.12-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    xen/spinlock: Document the xen_nopvspin parameter.
    xen/p2m: check MFN is in range before using the m2p table
    xen/balloon: don't alloc page while non-preemptible
    xen: Do not enable spinlocks before jump_label_init() has executed
    tpm: xen-tpmfront: Remove the locality sysfs attribute
    tpm: xen-tpmfront: Fix default durations

    Linus Torvalds
     
  • Pull device-mapper fixes from Mike Snitzer:
    "A few fixes for dm-snapshot, a 32 bit fix for dm-stats, a couple error
    handling fixes for dm-multipath. A fix for the thin provisioning
    target to not expose non-zero discard limits if discards are disabled.

    Lastly, add two DM module parameters which allow users to tune the
    emergency memory reserves that DM mainatins per device -- this helps
    fix a long-standing issue for dm-multipath. The conservative default
    reserve for request-based dm-multipath devices (256) has proven
    problematic for users with many multipathed SCSI devices but
    relatively little memory. To responsibly select a smaller value users
    should use the new nr_bios tracepoint info (via commit 75afb352
    "block: Add nr_bios to block_rq_remap tracepoint") to determine the
    peak number of bios their workloads create"

    * tag 'dm-3.12-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
    dm: add reserved_bio_based_ios module parameter
    dm: add reserved_rq_based_ios module parameter
    dm: lower bio-based mempool reservation
    dm thin: do not expose non-zero discard limits if discards disabled
    dm mpath: disable WRITE SAME if it fails
    dm-snapshot: fix performance degradation due to small hash size
    dm snapshot: workaround for a false positive lockdep warning
    dm stats: fix possible counter corruption on 32-bit systems
    dm mpath: do not fail path on -ENOSPC

    Linus Torvalds
     
  • Pull MIPS fixes from Ralf Baechle:

    - Fix a comment

    - A small cleanup the main purpose of which is to work around an
    internal compiler error bug in certain Codesource toolchains.

    * git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
    MIPS: mm: Move some checks out of 'for' loop in DMA operations
    MIPS: cpu-features.h: s/MIPS53/MIPS64/

    Linus Torvalds
     
  • Pull powerpc fixes from Ben Herrenschmidt:
    "Here are a few things for -rc2, this time it's all written by me so it
    can only be perfect .... right ? :)

    So we have the fix to call irq_enter/exit on the irq stack we've been
    discussing, plus a cleanup on top to remove an unused (and broken)
    stack limit tracking feature (well, make it 32-bit only in fact where
    it is used and works properly).

    Then we have two things that I wrote over the last couple of days and
    made the executive decision to include just because I can (and I'm
    sure you won't object .... right ?).

    They fix a couple of annoying and long standing "issues":

    - We had separate zImages for when booting via Open Firmware vs.
    booting via a flat device-tree, while it's trivial to make one that
    deals with both

    - We wasted a ton of cycles spinning secondary CPUs uselessly at boot
    instead of starting them when needed on pseries, thus contributing
    significantly to global warming"

    * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
    powerpc/pseries: Do not start secondaries in Open Firmware
    powerpc/zImage: make the "OF" wrapper support ePAPR boot
    powerpc: Remove ksp_limit on ppc64
    powerpc/irq: Run softirqs off the top of the irq stack

    Linus Torvalds
     
  • Pull x86 fixes from Ingo Molnar:
    "An EFI fix and two reboot-quirk fixes"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/reboot: Fix apparent cut-n-paste mistake in Dell reboot workaround
    x86/reboot: Add quirk to make Dell C6100 use reboot=pci automatically
    x86, efi: Don't map Boot Services on i386

    Linus Torvalds
     
  • Pull scheduler fixes from Ingo Molnar:
    "Three small fixes"

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    sched/balancing: Fix cfs_rq->task_h_load calculation
    sched/balancing: Fix 'local->avg_load > busiest->avg_load' case in fix_small_imbalance()
    sched/balancing: Fix 'local->avg_load > sds->avg_load' case in calculate_imbalance()

    Linus Torvalds
     
  • Pull perf fixes from Ingo Molnar:
    "Assorted standalone fixes"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/x86/intel: Add model number for Avoton Silvermont
    perf: Fix capabilities bitfield compatibility in 'struct perf_event_mmap_page'
    perf/x86/intel/uncore: Don't use smp_processor_id() in validate_group()
    perf: Update ABI comment
    tools lib lk: Uninclude linux/magic.h in debugfs.c
    perf tools: Fix old GCC build error in trace-event-parse.c:parse_proc_kallsyms()
    perf probe: Fix finder to find lines of given function
    perf session: Check for SIGINT in more loops
    perf tools: Fix compile with libelf without get_phdrnum
    perf tools: Fix buildid cache handling of kallsyms with kcore
    perf annotate: Fix objdump line parsing offset validation
    perf tools: Fill in new definitions for madvise()/mmap() flags
    perf tools: Sharpen the libaudit dependencies test

    Linus Torvalds
     
  • My old @it.uu.se email address is going away, so update relevant
    files to point to my @gmail.com address instead. In sata_promise.c
    just delete the address, people can get it from MAINTAINERS.

    Signed-off-by: Mikael Pettersson
    Signed-off-by: Linus Torvalds

    Mikael Pettersson
     

25 Sep, 2013

11 commits

  • The check cpu_needs_post_dma_flush() in mips_dma_sync_sg_for_cpu() and
    the check !plat_device_is_coherent() in mips_dma_sync_sg_for_device()
    can be moved outside the for loop.

    As a side effect, this also avoids a GCC bug that caused kernel compile
    to fail with the error:

    arch/mips/mm/dma-default.c: In function 'mips_dma_sync_sg_for_cpu':
    arch/mips/mm/dma-default.c:316:1: internal compiler error: in add_insn_before, at emit-rtl.c:3852

    This gcc failure is seen in Code Sourcery toolchains [e.g. gcc version
    4.7.2 (Sourcery CodeBench Lite 2012.09-99)] after commit "MIPS: Optimize
    current_cpu_type() for better code."

    Signed-off-by: Jayachandran C
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/5907/
    Reviewed-by: Markos Chandras
    Tested-by: Markos Chandras
    Signed-off-by: Ralf Baechle

    Jayachandran C
     
  • Which disables in the ticketlock slowpath the Xen PV optimization's.
    Useful for diagnosing issues and comparing benchmarks in
    over-commit CPU scenarios.

    Signed-off-by: Konrad Rzeszutek Wilk

    Konrad Rzeszutek Wilk
     
  • On hosts with more than 168 GB of memory, a 32-bit guest may attempt
    to grant map an MFN that is error cannot lookup in its mapping of the
    m2p table. There is an m2p lookup as part of m2p_add_override() and
    m2p_remove_override(). The lookup falls off the end of the mapped
    portion of the m2p and (because the mapping is at the highest virtual
    address) wraps around and the lookup causes a fault on what appears to
    be a user space address.

    do_page_fault() (thinking it's a fault to a userspace address), tries
    to lock mm->mmap_sem. If the gntdev device is used for the grant map,
    m2p_add_override() is called from from gnttab_mmap() with mm->mmap_sem
    already locked. do_page_fault() then deadlocks.

    The deadlock would most commonly occur when a 64-bit guest is started
    and xenconsoled attempts to grant map its console ring.

    Introduce mfn_to_pfn_no_overrides() which checks the MFN is within the
    mapped portion of the m2p table before accessing the table and use
    this in m2p_add_override(), m2p_remove_override(), and mfn_to_pfn()
    (which already had the correct range check).

    All faults caused by accessing the non-existant parts of the m2p are
    thus within the kernel address space and exception_fixup() is called
    without trying to lock mm->mmap_sem.

    This means that for MFNs that are outside the mapped range of the m2p
    then mfn_to_pfn() will always look in the m2p overrides. This is
    correct because it must be a foreign MFN (and the PFN in the m2p in
    this case is only relevant for the other domain).

    Signed-off-by: David Vrabel
    Cc: Stefano Stabellini
    Cc: Jan Beulich
    --
    v3: check for auto_translated_physmap in mfn_to_pfn_no_overrides()
    v2: in mfn_to_pfn() look in m2p_overrides if the MFN is out of
    range as it's probably foreign.
    Signed-off-by: Konrad Rzeszutek Wilk
    Acked-by: Stefano Stabellini

    David Vrabel
     
  • This seems to have been copied from the Optiplex 990 entry
    above, but somoene forgot to change the ident text.

    Signed-off-by: Dave Jones
    Link: http://lkml.kernel.org/r/20130925001344.GA13554@redhat.com
    Signed-off-by: Ingo Molnar

    Dave Jones
     
  • Starting secondary CPUs early on from Open Firmware and placing them
    in a holding spin loop slows down the boot process significantly under
    some hypervisors such as KVM.

    This is also unnecessary when RTAS supports querying the CPU state

    So let's not do it.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • This makes the "OF" zImage wrapper (zImage.pseries, zImage.pmac,
    zImage.maple) work if booted via a flat device-tree (ePAPR boot
    mode), and thus potentially usable with kexec.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • We've been keeping that field in thread_struct for a while, it contains
    the "limit" of the current stack pointer and is meant to be used for
    detecting stack overflows.

    It has a few problems however:

    - First, it was never actually *used* on 64-bit. Set and updated but
    not actually exploited

    - When switching stack to/from irq and softirq stacks, it's update
    is racy unless we hard disable interrupts, which is costly. This
    is fine on 32-bit as we don't soft-disable there but not on 64-bit.

    Thus rather than fixing 2 in order to implement 1 in some hypothetical
    future, let's remove the code completely from 64-bit. In order to avoid
    a clutter of ifdef's, we remove the updates from C code completely
    during interrupt stack switching, and instead maintain it from the
    asm helper that is used to do the stack switching in the first place.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • Nowadays, irq_exit() calls __do_softirq() pretty much directly
    instead of calling do_softirq() which switches to the decicated
    softirq stack.

    This has lead to observed stack overflows on powerpc since we call
    irq_enter() and irq_exit() outside of the scope that switches to
    the irq stack.

    This fixes it by moving the stack switching up a level, making
    irq_enter() and irq_exit() run off the irq stack.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • There is a loop in do_mlockall() that lacks a preemption point, which
    means that the following can happen on non-preemptible builds of the
    kernel. Dave Jones reports:

    "My fuzz tester keeps hitting this. Every instance shows the non-irq
    stack came in from mlockall. I'm only seeing this on one box, but
    that has more ram (8gb) than my other machines, which might explain
    it.

    INFO: rcu_preempt self-detected stall on CPU { 3} (t=6500 jiffies g=470344 c=470343 q=0)
    sending NMI to all CPUs:
    NMI backtrace for cpu 3
    CPU: 3 PID: 29664 Comm: trinity-child2 Not tainted 3.11.0-rc1+ #32
    Call Trace:
    lru_add_drain_all+0x15/0x20
    SyS_mlockall+0xa5/0x1a0
    tracesys+0xdd/0xe2"

    This commit addresses this problem by inserting the required preemption
    point.

    Reported-by: Dave Jones
    Signed-off-by: Paul E. McKenney
    Cc: KOSAKI Motohiro
    Cc: Michel Lespinasse
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul E. McKenney
     
  • s/Synopsis/Synopsys
    s/synopsis/synopsys

    Signed-off-by: Dinh Nguyen
    Cc: Pavel Machek
    CC: Arnd Bergmann
    CC: Olof Johansson
    Cc: Rob Herring
    Cc: Pawel Moll
    Cc: Mark Rutland
    Cc: Stephen Warren
    Cc: Ian Campbell
    Cc: Chris Ball
    Cc: Jaehoon Chung
    Cc: Seungwon Jeon
    Cc: Tomasz Figa
    Cc: devicetree@vger.kernel.org
    Cc: linux-mmc@vger.kernel.org
    CC: linux-arm-kernel@lists.infradead.org
    Acked-by: Olof Johansson
    Signed-off-by: Rob Herring

    Dinh Nguyen
     
  • Much of of_irq.h is needlessly ifdef'ed. Clean this up and minimize the
    amount ifdef'ed code. This fixes some build warnings when CONFIG_OF
    is not enabled (seen on i386 and x86_64):

    include/linux/of_irq.h:82:7: warning: 'struct device_node' declared inside parameter list [enabled by default]
    include/linux/of_irq.h:82:7: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
    include/linux/of_irq.h:87:47: warning: 'struct device_node' declared inside parameter list [enabled by default]

    Compile tested on i386, sparc and arm.

    Reported-by: Randy Dunlap
    Cc: Grant Likely
    Signed-off-by: Rob Herring

    Rob Herring