01 Sep, 2014

6 commits

  • unicore32 builds fail with

    arch/unicore32/kernel/signal.c: In function ‘setup_frame’:
    arch/unicore32/kernel/signal.c:257: error: ‘usig’ undeclared (first use in this function)
    arch/unicore32/kernel/signal.c:279: error: ‘usig’ undeclared (first use in this function)
    arch/unicore32/kernel/signal.c: In function ‘handle_signal’:
    arch/unicore32/kernel/signal.c:306: warning: unused variable ‘tsk’
    arch/unicore32/kernel/signal.c: In function ‘do_signal’:
    arch/unicore32/kernel/signal.c:376: error: implicit declaration of function ‘get_signsl’
    make[1]: *** [arch/unicore32/kernel/signal.o] Error 1
    make: *** [arch/unicore32/kernel/signal.o] Error 2

    Bisect points to commit 649671c90eaf ("unicore32: Use get_signal()
    signal_setup_done()").

    This code never even compiled. Reverting the patch does not work, since
    previously used functions no longer exist, so try to fix it up. Compile
    tested only.

    Fixes: 649671c90eaf ("unicore32: Use get_signal() signal_setup_done()")
    Cc: Richard Weinberger
    Signed-off-by: Guenter Roeck
    Signed-off-by: Linus Torvalds

    Guenter Roeck
     
  • Pull ARM fixes from Russell King:
    "Various assorted fixes:

    - a couple of patches from Mark Rutland to resolve an errata with
    Cortex-A15 CPUs.
    - fix cpuidle for the CPU part ID changes in the last merge window
    - add support for a relocation which ARM binutils is generating in
    some circumstances"

    * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
    ARM: 8130/1: cpuidle/cpuidle-big_little: fix reading cpu id part number
    ARM: 8129/1: errata: work around Cortex-A15 erratum 830321 using dummy strex
    ARM: 8128/1: abort: don't clear the exclusive monitors
    ARM: 8127/1: module: add support for R_ARM_TARGET1 relocations

    Linus Torvalds
     
  • Pull ARM SoC fixes from Olof Johansson:
    "Here's the weekly batch of fixes from arm-soc.

    The delta is a largeish negative delta, due to revert of SMP support
    for Broadcom's STB SoC -- it was accidentally merged before some
    issues had been addressed, so they will make a new attempt for 3.18.
    I didn't see a need for a full revert of the whole platform due to
    this, we're keeping the rest enabled.

    The rest is mostly:

    - a handful of DT fixes for i.MX (Hummingboard/Cubox-i in particular)
    - some MTD/NAND fixes for OMAP
    - minor DT fixes for shmobile
    - warning fix for UP builds on vexpress/spc

    There's also a couple of patches that wires up hwmod on TI's DRA7 SoC
    so it can boot. Drivers and the rest had landed for 3.17, and it's
    small and isolated so it made sense to pick up now even if it's not a
    bugfix"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (23 commits)
    vexpress/spc: fix a build warning on array bounds
    ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists
    ARM: DRA7: Add support for soc_is_dra74x() and soc_is_dra72x() variants
    MAINTAINERS: catch special Rockchip code locations
    ARM: dts: microsom-ar8035: MDIO pad must be set open drain
    ARM: dts: omap54xx-clocks: Fix the l3 and l4 clock rates
    ARM: brcmstb: revert SMP support
    ARM: OMAP2+: hwmod: Rearm wake-up interrupts for DT when MUSB is idled
    ARM: dts: Enable UART wake-up events for beagleboard
    ARM: dts: Remove twl6030 clk32g "regulator"
    ARM: OMAP2+: omap_device: remove warning that clk alias already exists
    ARM: OMAP: fix %d confusingly prefixed with 0x in format string
    ARM: dts: DRA7: fix interrupt-cells for GPIO
    mtd: nand: omap: Fix 1-bit Hamming code scheme, omap_calculate_ecc()
    ARM: dts: omap3430-sdp: Revert to using software ECC for NAND
    ARM: OMAP2+: GPMC: Support Software ECC scheme via DT
    mtd: nand: omap: Revert to using software ECC by default
    ARM: dts: hummingboard/cubox-i: change SPDIF output to be more descriptive
    ARM: dts: hummingboard/cubox-i: add USB OC pinctrl configuration
    ARM: shmobile: r8a7791: add missing 0x0100 for SDCKCR
    ...

    Linus Torvalds
     
  • With ARCH_VEXPRESS_SPC option, kernel build has the following
    warning:

    arch/arm/mach-vexpress/spc.c: In function ‘ve_spc_clk_init’:
    arch/arm/mach-vexpress/spc.c:431:38: warning: array subscript is below array bounds [-Warray-bounds]
    struct ve_spc_opp *opps = info->opps[cluster];
    ^
    since 'cluster' maybe '-1' in UP system. This patch does a active
    checking to fix this issue.

    Signed-off-by: Alex Shi
    Acked-by: Pawel Moll
    Acked-by: Sudeep Holla
    Signed-off-by: Olof Johansson

    Alex Shi
     
  • …scm/linux/kernel/git/pjw/omap-pending into fixes

    Pull "ARM: OMAP2+: DRA72x/DRA74x basic support" from Tony Lindgren:

    Add basic subarchitecture support for the DRA72x and DRA74x. These
    are OMAP2+ derivative SoCs. This should be low-risk to existing OMAP
    platforms.

    Basic build, boot, and PM test logs are available here:

    http://www.pwsan.com/omap/testlogs/hwmod-a-early-v3.17-rc/20140827194314/

    * tag 'for-v3.17-rc/omap-dra72x-d74x-support-a' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending:
    ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists
    ARM: DRA7: Add support for soc_is_dra74x() and soc_is_dra72x() variants

    Signed-off-by: Olof Johansson <olof@lixom.net>

    Olof Johansson
     
  • Pull spi bugfixes from Mark Brown:
    "A smattering of bug fixes for the SPI subsystem, all in driver code
    which has seen active work recently and none of them with any great
    global impact.

    There's also a new ACPI ID for the pxa2xx driver which required no
    code changes and the addition of kerneldoc for some structure fields
    that were missing it and generating warnings during documentation
    builds as a result"

    * tag 'spi-v3.17-rc3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
    spi: sh-msiof: Fix transmit-only DMA transfers
    spi/rockchip: Avoid accidentally turning off the clock
    spi: dw: fix kernel crash due to NULL pointer dereference
    spi: dw-pci: fix bug when regs left uninitialized
    spi: davinci: fix SPI_NO_CS functionality
    spi/rockchip: fixup incorrect dma direction setting
    spi/pxa2xx: Add ACPI ID for Intel Braswell
    spi: spi-au1550: fix build failure
    spi: rspi: Fix leaking of unused DMA descriptors
    spi: sh-msiof: Fix leaking of unused DMA descriptors
    spi: Add missing kerneldoc bits
    spi/omap-mcspi: Fix the spi task hangs waiting dma_rx

    Linus Torvalds
     

31 Aug, 2014

6 commits


30 Aug, 2014

28 commits

  • Pull x86 fixes from Peter Anvin:
    "One patch to avoid assigning interrupts we don't actually have on
    non-PC platforms, and two patches that addresses bugs in the new
    IOAPIC assignment code"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, irq, PCI: Keep IRQ assignment for runtime power management
    x86: irq: Fix bug in setting IOAPIC pin attributes
    x86: Fix non-PC platform kernel crash on boot due to NULL dereference

    Linus Torvalds
     
  • Pull ACPI and power management fixes from Rafael Wysocki:

    - Fix for an ACPI regression related to the handling of fixed events
    that caused netlink routines to be (incorrectly) run in interrupt
    context from Lan Tianyu

    - Fix for an ACPI EC driver regression on Acer Aspire V5-573G that
    caused AC/battery plug/unplug and video brightness change
    notifications to be delayed on that machine from Lv Zheng

    - Fix for an ACPI device enumeration regression that caused ACPI driver
    probe to fail for some devices where it succeeded before (Rafael J
    Wysocki)

    - intel_pstate driver fix to prevent it from printing an information
    message for every CPU in the system on every boot from Andi Kleen

    - s5pv210 cpufreq driver fix to remove an __init annotation from a
    routine that in fact can be called at any time after init too from
    Mark Brown

    - New Intel Braswell device ID for the ACPI LPSS (Low-Power Subsystem)
    driver from Alan Cox

    - New Intel Braswell CPU ID for intel_pstate from Mika Westerberg

    * tag 'pm+acpi-3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    cpufreq: s5pv210: Remove spurious __init annotation
    cpufreq: intel_pstate: Add CPU ID for Braswell processor
    intel_pstate: Turn per cpu printk into pr_debug
    ACPI / LPSS: Add ACPI IDs for Intel Braswell
    ACPI / EC: Add support to disallow QR_EC to be issued before completing previous QR_EC
    ACPI / EC: Add support to disallow QR_EC to be issued when SCI_EVT isn't set
    ACPI: Run fixed event device notifications in process context
    ACPI / scan: Allow ACPI drivers to bind to PNP device objects

    Linus Torvalds
     
  • Merge patches from Andrew Morton:
    "22 fixes"

    * emailed patches from Andrew Morton : (22 commits)
    kexec: purgatory: add clean-up for purgatory directory
    Documentation/kdump/kdump.txt: add ARM description
    flush_icache_range: export symbol to fix build errors
    tools: selftests: fix build issue with make kselftests target
    ocfs2: quorum: add a log for node not fenced
    ocfs2: o2net: set tcp user timeout to max value
    ocfs2: o2net: don't shutdown connection when idle timeout
    ocfs2: do not write error flag to user structure we cannot copy from/to
    x86/purgatory: use approprate -m64/-32 build flag for arch/x86/purgatory
    drivers/rtc/rtc-s5m.c: re-add support for devices without irq specified
    xattr: fix check for simultaneous glibc header inclusion
    kexec: remove CONFIG_KEXEC dependency on crypto
    kexec: create a new config option CONFIG_KEXEC_FILE for new syscall
    x86,mm: fix pte_special versus pte_numa
    hugetlb_cgroup: use lockdep_assert_held rather than spin_is_locked
    mm/zpool: use prefixed module loading
    zram: fix incorrect stat with failed_reads
    lib: turn CONFIG_STACKTRACE into an actual option.
    mm: actually clear pmd_numa before invalidating
    memblock, memhotplug: fix wrong type in memblock_find_in_range_node().
    ...

    Linus Torvalds
     
  • Without this patch the kexec-purgatory.c and purgatory.ro files are not
    removed after make mrproper.

    Signed-off-by: Michael Welling
    Acked-by: Vivek Goyal
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Welling
     
  • Add arm specific parts to kdump kernel documentation.

    Signed-off-by: Hu Keping
    Acked-by: Vivek Goyal
    Cc: Haren Myneni
    Cc: Rob Landley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    HuKeping
     
  • Fix building errors occuring due to a missing export of
    flush_icache_range() in

    kisskb.ellerman.id.au/kisskb/buildresult/11677809/

    ERROR: "flush_icache_range" [drivers/misc/lkdtm.ko] undefined!

    Signed-off-by: Pranith Kumar
    Reported-by: Geert Uytterhoeven
    Acked-by: Vineet Gupta [arc]
    Acked-by: Richard Kuo [hexagon]
    Cc: Chris Metcalf
    Cc: Chris Zankel
    Acked-by: Max Filippov [xtensa]
    Cc: Noam Camus
    Cc: Masami Hiramatsu
    Acked-by: Zhigang Lu [tile]
    Cc: Kirill Tkhai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pranith Kumar
     
  • Fix the typo of ARCH when running 'make kselftests'. Change the 'X86'
    to 'x86'. Test by compilation.

    Signed-off-by: Phong Tran
    Cc: David Herrmann
    Cc: Hugh Dickins
    Cc: Shuah Khan
    Cc: Sam Ravnborg
    Cc: Michal Marek
    Cc: Shuah Khan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Phong Tran
     
  • For debug use, we can see from the log whether the fence decision is
    made and why it is not fenced.

    Signed-off-by: Junxiao Bi
    Reviewed-by: Srinivas Eeda
    Reviewed-by: Mark Fasheh
    Cc: Joel Becker
    Cc: Joseph Qi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Junxiao Bi
     
  • When tcp retransmit timeout(15mins), the connection will be closed.
    Pending messages may be lost during this time. So we set tcp user
    timeout to override the retransmit timeout to the max value. This is OK
    for ocfs2 since we have disk heartbeat, if peer crash, the disk
    heartbeat will timeout and it will be evicted, if disk heartbeat not
    timeout and connection idle for a long time, then this means the cluster
    enters split-brain state, since fence can't happen, we'd better keep the
    connection and wait network recover.

    Signed-off-by: Junxiao Bi
    Reviewed-by: Srinivas Eeda
    Reviewed-by: Mark Fasheh
    Cc: Joel Becker
    Cc: Joseph Qi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Junxiao Bi
     
  • This patch series is to fix a possible message lost bug in ocfs2 when
    network go bad. This bug will cause ocfs2 hung forever even network
    become good again.

    The messages may lost in this case. After the tcp connection is
    established between two nodes, an idle timer will be set to check its
    state periodically, if no messages are received during this time, idle
    timer will timeout, it will shutdown the connection and try to
    reconnect, so pending messages in tcp queues will be lost. This
    messages may be from dlm. Dlm may get hung in this case. This may
    cause the whole ocfs2 cluster hung.

    This is very possible to happen when network state goes bad. Do the
    reconnect is useless, it will fail if network state is still bad. Just
    waiting there for network recovering may be a good idea, it will not
    lost messages and some node will be fenced until cluster goes into
    split-brain state, for this case, Tcp user timeout is used to override
    the tcp retransmit timeout. It will timeout after 25 days, user should
    have notice this through the provided log and fix the network, if they
    don't, ocfs2 will fall back to original reconnect way.

    This patch (of 3):

    Some messages in the tcp queue maybe lost if we shutdown the connection
    and reconnect when idle timeout. If packets lost and reconnect success,
    then the ocfs2 cluster maybe hung.

    To fix this, we can leave the connection there and do the fence decision
    when idle timeout, if network recover before fence dicision is made, the
    connection survive without lost any messages.

    This bug can be saw when network state go bad. It may cause ocfs2 hung
    forever if some packets lost. With this fix, ocfs2 will recover from
    hung if network becomes good again.

    Signed-off-by: Junxiao Bi
    Reviewed-by: Srinivas Eeda
    Reviewed-by: Mark Fasheh
    Cc: Joel Becker
    Cc: Joseph Qi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Junxiao Bi
     
  • If we failed to copy from the structure, writing back the flags leaks 31
    bits of kernel memory (the rest of the ir_flags field).

    In any case, if we cannot copy from/to the structure, why should we
    expect putting just the flags to work?

    Also make sure ocfs2_info_handle_freeinode() returns the right error
    code if the copy_to_user() fails.

    Fixes: ddee5cdb70e6 ('Ocfs2: Add new OCFS2_IOC_INFO ioctl for ocfs2 v8.')
    Signed-off-by: Ben Hutchings
    Cc: Joel Becker
    Acked-by: Mark Fasheh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Hutchings
     
  • Thomas reported that build of x86_64 kernel was failing for him. He is
    using 32bit tool chain.

    Problem is that while compiling purgatory, I have not specified -m64
    flag. And 32bit tool chain must be assuming -m32 by default.

    Following is error message.

    (mini) [~/work/linux-2.6] make
    scripts/kconfig/conf --silentoldconfig Kconfig
    CHK include/config/kernel.release
    UPD include/config/kernel.release
    CHK include/generated/uapi/linux/version.h
    CHK include/generated/utsrelease.h
    UPD include/generated/utsrelease.h
    CC arch/x86/purgatory/purgatory.o
    arch/x86/purgatory/purgatory.c:1:0: error: code model 'large' not supported in
    the 32 bit mode

    Fix it by explicitly passing appropriate -m64/-m32 build flag for
    purgatory.

    Reported-by: Thomas Glanzmann
    Tested-by: Thomas Glanzmann
    Suggested-by: H. Peter Anvin
    Signed-off-by: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     
  • The rtc-s5m driver used to support devices without irq specified in the
    past. Re-add this support.

    The patch fixes boot for Insignal's Exynos4412 based Origen board.

    Error messages before the patch:

    ...
    Unable to handle kernel NULL pointer dereference at virtual address 00000094
    pgd = c0004000
    [00000094] *pgd=00000000
    Internal error: Oops: 5 [#1] PREEMPT SMP ARM
    Modules linked in:
    CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.16.0-next-20140804-00008-ga59480f-dirty #701
    task: ea80f000 ti: ea882000 task.ti: ea882000
    PC is at regmap_irq_get_virq+0x0/0x28
    LR is at s5m_rtc_probe+0xdc/0x310
    pc : [] lr : [] psr: 80000153
    sp : ea883e48 ip : 00000000 fp : 00000000
    r10: 0000000c r9 : c05de7ac r8 : eaabc600
    r7 : eaa6b4d0 r6 : c0439e8c r5 : eaabc610 r4 : eab30e50
    r3 : 00000000 r2 : 00000000 r1 : 0000000c r0 : 00000000
    Flags: Nzcv IRQs on FIQs off Mode SVC_32 ISA ARM Segment kernel
    Control: 10c5387d Table: 4000404a DAC: 00000015
    Process swapper/0 (pid: 1, stack limit = 0xea882240)
    Backtrace:
    regmap_irq_get_virq
    s5m_rtc_probe
    platform_drv_probe
    driver_probe_device
    __driver_attach
    bus_for_each_dev
    bus_add_driver
    driver_register
    do_one_initcall
    kernel_init_freeable
    kernel_init
    ---[ end trace a954d7f019122700 ]---
    Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
    ...

    Signed-off-by: Bartlomiej Zolnierkiewicz
    Reviewed-by: Krzysztof Kozlowski
    Tested-by: Krzysztof Kozlowski
    Acked-by: Kyungmin Park
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bartlomiej Zolnierkiewicz
     
  • The guard was introduced in commit ea1a8217b06b ("xattr: guard against
    simultaneous glibc header inclusion") but it is using #ifdef to check
    for a define that is either set to 1 or 0. Fix it to use #if instead.

    * Without this patch:

    $ { echo "#include "; echo "#include "; } | gcc -E -Iinclude/uapi - >/dev/null
    include/uapi/linux/xattr.h:19:0: warning: "XATTR_CREATE" redefined [enabled by default]
    #define XATTR_CREATE 0x1 /* set value, fail if attr already exists */
    ^
    /usr/include/x86_64-linux-gnu/sys/xattr.h:32:0: note: this is the location of the previous definition
    #define XATTR_CREATE XATTR_CREATE
    ^

    * With this patch:

    $ { echo "#include "; echo "#include "; } | gcc -E -Iinclude/uapi - >/dev/null
    (no warnings)

    Signed-off-by: Filipe Brandenburger
    Acked-by: Serge E. Hallyn
    Cc: Allan McRae
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Filipe Brandenburger
     
  • New system call depends on crypto. As it did not have a separate config
    option, CONFIG_KEXEC was modified to select CRYPTO and CRYPTO_SHA256.

    But now previous patch introduced a new config option for new syscall.
    So CONFIG_KEXEC does not require crypto. Remove that dependency.

    Signed-off-by: Vivek Goyal
    Cc: Eric Biederman
    Cc: H. Peter Anvin
    Cc: Shaun Ruffell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     
  • Currently new system call kexec_file_load() and all the associated code
    compiles if CONFIG_KEXEC=y. But new syscall also compiles purgatory
    code which currently uses gcc option -mcmodel=large. This option seems
    to be available only gcc 4.4 onwards.

    Hiding new functionality behind a new config option will not break
    existing users of old gcc. Those who wish to enable new functionality
    will require new gcc. Having said that, I am trying to figure out how
    can I move away from using -mcmodel=large but that can take a while.

    I think there are other advantages of introducing this new config
    option. As this option will be enabled only on x86_64, other arches
    don't have to compile generic kexec code which will never be used. This
    new code selects CRYPTO=y and CRYPTO_SHA256=y. And all other arches had
    to do this for CONFIG_KEXEC. Now with introduction of new config
    option, we can remove crypto dependency from other arches.

    Now CONFIG_KEXEC_FILE is available only on x86_64. So whereever I had
    CONFIG_X86_64 defined, I got rid of that.

    For CONFIG_KEXEC_FILE, instead of doing select CRYPTO=y, I changed it to
    "depends on CRYPTO=y". This should be safer as "select" is not
    recursive.

    Signed-off-by: Vivek Goyal
    Cc: Eric Biederman
    Cc: H. Peter Anvin
    Tested-by: Shaun Ruffell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     
  • Sasha Levin has shown oopses on ffffea0003480048 and ffffea0003480008 at
    mm/memory.c:1132, running Trinity on different 3.16-rc-next kernels:
    where zap_pte_range() checks page->mapping to see if PageAnon(page).

    Those addresses fit struct pages for pfns d2001 and d2000, and in each
    dump a register or a stack slot showed d2001730 or d2000730: pte flags
    0x730 are PCD ACCESSED PROTNONE SPECIAL IOMAP; and Sasha's e820 map has
    a hole between cfffffff and 100000000, which would need special access.

    Commit c46a7c817e66 ("x86: define _PAGE_NUMA by reusing software bits on
    the PMD and PTE levels") has broken vm_normal_page(): a PROTNONE SPECIAL
    pte no longer passes the pte_special() test, so zap_pte_range() goes on
    to try to access a non-existent struct page.

    Fix this by refining pte_special() (SPECIAL with PRESENT or PROTNONE) to
    complement pte_numa() (SPECIAL with neither PRESENT nor PROTNONE). A
    hint that this was a problem was that c46a7c817e66 added pte_numa() test
    to vm_normal_page(), and moved its is_zero_pfn() test from slow to fast
    path: This was papering over a pte_special() snag when the zero page was
    encountered during zap. This patch reverts vm_normal_page() to how it
    was before, relying on pte_special().

    It still appears that this patch may be incomplete: aren't there other
    places which need to be handling PROTNONE along with PRESENT? For
    example, pte_mknuma() clears _PAGE_PRESENT and sets _PAGE_NUMA, but on a
    PROT_NONE area, that would make it pte_special(). This is side-stepped
    by the fact that NUMA hinting faults skipped PROT_NONE VMAs and there
    are no grounds where a NUMA hinting fault on a PROT_NONE VMA would be
    interesting.

    Fixes: c46a7c817e66 ("x86: define _PAGE_NUMA by reusing software bits on the PMD and PTE levels")
    Reported-by: Sasha Levin
    Tested-by: Sasha Levin
    Signed-off-by: Hugh Dickins
    Signed-off-by: Mel Gorman
    Cc: "Kirill A. Shutemov"
    Cc: Peter Zijlstra
    Cc: Rik van Riel
    Cc: Johannes Weiner
    Cc: Cyrill Gorcunov
    Cc: Matthew Wilcox
    Cc: [3.16]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • spin_lock may be an empty struct for !SMP configurations and so
    arch_spin_is_locked may return unconditional 0 and trigger the VM_BUG_ON
    even when the lock is held.

    Replace spin_is_locked by lockdep_assert_held. We will not BUG anymore
    but it is questionable whether crashing makes a lot of sense in the
    uncharge path. Uncharge happens after the last page reference was
    released so nobody should touch the page and the function doesn't update
    any shared state except for res counter which uses synchronization of
    its own.

    Signed-off-by: Michal Hocko
    Reviewed-by: Aneesh Kumar K.V
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michal Hocko
     
  • To avoid potential format string expansion via module parameters, do not
    use the zpool type directly in request_module() without a format string.
    Additionally, to avoid arbitrary modules being loaded via zpool API
    (e.g. via the zswap_zpool_type module parameter) add a "zpool-" prefix
    to the requested module, as well as module aliases for the existing
    zpool types (zbud and zsmalloc).

    Signed-off-by: Kees Cook
    Cc: Seth Jennings
    Cc: Minchan Kim
    Cc: Nitin Gupta
    Acked-by: Dan Streetman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     
  • Since we allocate a temporary buffer in zram_bvec_read to handle partial
    page operations in commit 924bd88d703e ("Staging: zram: allow partial
    page operations"), our ->failed_reads value may be incorrect as we do
    not increase its value when failing to allocate the temporary buffer.

    Let's fix this issue and correct the annotation of failed_reads.

    Signed-off-by: Chao Yu
    Acked-by: Minchan Kim
    Cc: Nitin Gupta
    Acked-by: Jerome Marchand
    Acked-by: Sergey Senozhatsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chao Yu
     
  • I was puzzled why /proc/$$/stack had disappeared, until I figured out I
    had disabled the last debug option that did a 'select STACKTRACE'. This
    patch makes the option show up at config time, so it can be enabled
    without enabling any of the more heavyweight debug options.

    Signed-off-by: Dave Jones
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Jones
     
  • Commit 67f87463d3a3 ("mm: clear pmd_numa before invalidating") cleared
    the NUMA bit in a copy of the PMD entry, but then wrote back the
    original

    Signed-off-by: Matthew Wilcox
    Acked-by: Mel Gorman
    Reviewed-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthew Wilcox
     
  • In memblock_find_in_range_node(), we defined ret as int. But it should
    be phys_addr_t because it is used to store the return value from
    __memblock_find_range_bottom_up().

    The bug has not been triggered because when allocating low memory near
    the kernel end, the "int ret" won't turn out to be negative. When we
    started to allocate memory on other nodes, and the "int ret" could be
    minus. Then the kernel will panic.

    A simple way to reproduce this: comment out the following code in
    numa_init(),

    memblock_set_bottom_up(false);

    and the kernel won't boot.

    Reported-by: Xishi Qiu
    Signed-off-by: Tang Chen
    Tested-by: Xishi Qiu
    Cc: [3.13+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tang Chen
     
  • Richard and Daniel reported that UML is broken due to changes to
    resource traversal functions. Problem is that iomem_resource.child can
    be null and new code does not consider that possibility. Old code used
    a for loop and that loop will not even execute if p was null.

    Revert back to for() loop logic and bail out if p is null.

    I also moved sibling_only check out of resource_lock. There is no
    reason to keep it inside the lock.

    Following is backtrace of the UML crash.

    RIP: 0033:[]
    RSP: 0000000081459da0 EFLAGS: 00010202
    RAX: 0000000000000000 RBX: 00000000219b3fff RCX: 000000006010d1d9
    RDX: 0000000000000001 RSI: 00000000602dfb94 RDI: 0000000081459df8
    RBP: 0000000081459de0 R08: 00000000601b59f4 R09: ffffffff0000ff00
    R10: ffffffff0000ff00 R11: 0000000081459e88 R12: 0000000081459df8
    R13: 00000000219b3fff R14: 00000000602dfb94 R15: 0000000000000000
    Kernel panic - not syncing: Segfault with no mm
    CPU: 0 PID: 1 Comm: swapper Not tainted 3.16.0-10454-g58d08e3 #13
    Stack:
    00000000 000080d0 81459df0 219b3fff
    81459e70 6010d1d9 ffffffff 6033e010
    81459e50 6003a269 81459e30 00000000
    Call Trace:
    [] ? kclist_add_private+0x0/0xe7
    [] walk_system_ram_range+0x61/0xb7
    [] ? proc_kcore_init+0x0/0xf1
    [] kcore_update_ram+0x4c/0x168
    [] ? kclist_add+0x0/0x2e
    [] proc_kcore_init+0xea/0xf1
    [] ? proc_kcore_init+0x0/0xf1
    [] ? proc_kcore_init+0x0/0xf1
    [] do_one_initcall+0x13c/0x204
    [] ? parse_args+0x1df/0x2e0
    [] ? parameq+0x0/0x3a
    [] ? strcpy+0x0/0x18
    [] kernel_init_freeable+0x240/0x31e
    [] kernel_init+0x12/0x148
    [] new_thread_handler+0x81/0xa3

    Fixes 8c86e70acead629aacb4a ("resource: provide new functions to walk
    through resources").

    Reported-by: Daniel Walter
    Tested-by: Richard Weinberger
    Tested-by: Toralf Förster
    Tested-by: Daniel Walter
    Signed-off-by: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     
  • Checkpatch currently warns if a git commit ID (in the changelog,
    usually) is less than 12 characters or more than 16. The "more than 16"
    is excessive. Change the check so we accept IDs from 12 to 40 chars in
    length.

    Cc: Geert Uytterhoeven
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Pull NFS client fixes from Trond Myklebust:
    "Highlights:
    - NFSv3 stable fix for another POSIX ACL regression
    - NFSv4 stable fix for a regression with OPEN_DOWNGRADE
    - NFSv4 stable fix for bad close() behaviour when holding a delegation"

    * tag 'nfs-for-3.17-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
    NFSv3: Fix another acl regression
    NFSv4: Don't clear the open state when we just did an OPEN_DOWNGRADE
    NFSv4: Fix problems with close in the presence of a delegation

    Linus Torvalds
     
  • Pull USB fixes from Greg KH:
    "Here are a bunch of fixes for the USB drivers for 3.17-rc3.

    Also in here is the movement of the usbip driver out of staging, into
    the "real" part of the kernel, it had to wait until after -rc1 to
    handle the merge issues involved between the USB and staging trees.
    The code is identical, just file movements there.

    The USB fixes are all over the place, new device ids, xhci fixes for
    reported issues and the usual gadget driver fixes as well. All have
    been in linux-next for a while now"

    * tag 'usb-3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (46 commits)
    USB: fix build error with CONFIG_PM_RUNTIME disabled
    Revert "usb: ehci/ohci-exynos: Fix PHY getting sequence"
    xhci: Disable streams on Via XHCI with device-id 0x3432
    USB: serial: fix potential heap buffer overflow
    USB: serial: fix potential stack buffer overflow
    usb: ehci/ohci-exynos: Fix PHY getting sequence
    usb: hub: Prevent hub autosuspend if usbcore.autosuspend is -1
    USB: sisusb: add device id for Magic Control USB video
    usb: dwc2: gadget: Set the default EP max packet value as 8 bytes
    usb: ehci: using wIndex + 1 for hub port
    USB: storage: add quirk for Newer Technology uSCSI SCSI-USB converter
    MAINTAINERS: Add an entry for USB/IP driver
    usbip: remove struct usb_device_id table
    usbip: move usbip kernel code out of staging
    usbip: move usbip userspace code out of staging
    USB: whiteheat: Added bounds checking for bulk command response
    usb: gadget: remove $(PWD) in ccflags-y
    usb: pch_udc: usb gadget device support for Intel Quark X1000
    usb: gadget: uvc: fix possible lockup in uvc gadget
    usb: wusbcore: fix below build warning
    ...

    Linus Torvalds
     
  • Pull staging driver fixes from Greg KH:
    "Here are some staging driver fixes for your tree. Nothing huge, just
    some fixes for issues that have been reported and a few new device ids
    added.

    All have been in linux-next for a while"

    * tag 'staging-3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
    staging: r8188eu: Add new USB ID
    staging/rtl8188eu: add 0df6:0076 Sitecom Europe B.V.
    staging: android: fix a possible memory leak
    staging: lustre: lustre: libcfs: workitem.c: Cleaning up missing null-terminate after strncpy call
    staging: et131x: Fix errors caused by phydev->addr accesses before initialisation
    staging: lustre: Remove circular dependency on header

    Linus Torvalds