31 Aug, 2014

1 commit

  • Pull file locking bugfx from Jeff Layton:
    "Just a bugfix for a bug that crept in to v3.15. It's in a rather rare
    error path, and I'm not aware of anyone having hit it, but it's worth
    fixing for v3.17"

    * tag 'locks-v3.17-3' of git://git.samba.org/jlayton/linux:
    locks: pass correct "before" pointer to locks_unlink_lock in generic_add_lease

    Linus Torvalds
     

30 Aug, 2014

35 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
     
  • Pull char/misc driver fixes from Greg KH:
    "Here are 3 fixes for the mei and thunderbolt drivers that resolve some
    reported issues.

    All have been in linux-next for a while"

    * tag 'char-misc-3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
    thunderbolt: Clear hops before overwriting
    mei: nfc: fix memory leak in error path
    mei: reset client state on queued connect request

    Linus Torvalds
     
  • Pull fbdev fixes from Tomi Valkeinen:
    "Minor fbdev fixes for da8xx-fb, atmel_lcdfb, arm clcd and chipsfb"

    * tag 'fbdev-fixes-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
    video: da8xx-fb: preserve display width when changing HSYNC
    video: of: display_timing: double free on error
    drivers: video: fbdev: atmel_lcdfb.c: fix error return code
    video: ARM CLCD: Fix calculation of bits-per-pixel
    fbdev: Remove __init from chips_hw_init() to fix build failure

    Linus Torvalds
     
  • Pull ext4 bugfixes from Ted Ts'o:
    "Ext4 bug fixes for 3.17, to provide better handling of memory
    allocation failures, and to fix some journaling bugs involving
    journal checksums and FALLOC_FL_ZERO_RANGE"

    * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
    ext4: fix same-dir rename when inline data directory overflows
    jbd2: fix descriptor block size handling errors with journal_csum
    jbd2: fix infinite loop when recovering corrupt journal blocks
    ext4: update i_disksize coherently with block allocation on error path
    ext4: fix transaction issues for ext4_fallocate and ext_zero_range
    ext4: fix incorect journal credits reservation in ext4_zero_range
    ext4: move i_size,i_disksize update routines to helper function
    ext4: fix BUG_ON in mb_free_blocks()
    ext4: propagate errors up to ext4_find_entry()'s callers

    Linus Torvalds
     
  • Pull device mapper fix from Mike Snitzer:
    "Fix a 3.17-rc1 regression introduced by switching the DM crypt target
    to using per-bio data"

    * tag 'dm-3.17-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
    dm crypt: fix access beyond the end of allocated space

    Linus Torvalds
     
  • Pull block layer fixes from Jens Axboe:
    "A smaller collection of fixes that have come up since the initial
    merge window pull request. This contains:

    - error handling cleanup and support for larger than 16 byte cdbs in
    sg_io() from Christoph. The latter just matches what bsg and
    friends support, sg_io() got left out in the merge.

    - an option for brd to expose partitions in /proc/partitions. They
    are hidden by default for compat reasons. From Dmitry Monakhov.

    - a few blk-mq fixes from me - killing a dead/unused flag, fix for
    merging happening even if turned off, and correction of a few
    comments.

    - removal of unnecessary ->owner setting in systemace. From Michal
    Simek.

    - two related fixes for a problem with nesting freezing of queues in
    blk-mq. One from Ming Lei removing an unecessary freeze operation,
    and another from Tejun fixing the nesting regression introduced in
    the merge window.

    - fix for a BUG_ON() at bio_endio time when protection info is
    attached and the IO has an error. From Sagi Grimberg.

    - two scsi_ioctl bug fixes for regressions with scsi-mq from Tony
    Battersby.

    - a cfq weight update fix and subsequent comment update from Toshiaki
    Makita"

    * 'for-linus' of git://git.kernel.dk/linux-block:
    cfq-iosched: Add comments on update timing of weight
    cfq-iosched: Fix wrong children_weight calculation
    block: fix error handling in sg_io
    fix regression in SCSI_IOCTL_SEND_COMMAND
    scsi-mq: fix requests that use a separate CDB buffer
    block: support > 16 byte CDBs for SG_IO
    block: cleanup error handling in sg_io
    brd: add ram disk visibility option
    block: systemace: Remove .owner field for driver
    blk-mq: blk_mq_freeze_queue() should allow nesting
    blk-mq: correct a few wrong/bad comments
    block: Fix BUG_ON when pi errors occur
    blk-mq: don't allow merges if turned off for the queue
    blk-mq: get rid of unused BLK_MQ_F_SHOULD_SORT flag
    blk-mq: fix WARNING "percpu_ref_kill() called more than once!"

    Linus Torvalds
     
  • write{b,w,l,q}_relaxed are implemented by some architectures in order to
    permit memory-mapped I/O writes with weaker barrier semantics than the
    non-relaxed variants.

    This patch implements these write macros for Alpha, in the same vein as
    the relaxed read macros, which are already implemented.

    Acked-by: Richard Henderson
    Cc: Ivan Kokshaysky
    Signed-off-by: Will Deacon
    Signed-off-by: Matt Turner
    Signed-off-by: Linus Torvalds

    Will Deacon
     
  • Signed-off-by: Michael Cree
    Signed-off-by: Matt Turner
    Signed-off-by: Linus Torvalds

    Michael Cree
     

29 Aug, 2014

4 commits

  • Now IOAPIC driver dynamically allocates IRQ numbers for IOAPIC pins.
    We need to keep IRQ assignment for PCI devices during runtime power
    management, otherwise it may cause failure of device wakeups.

    Commit 3eec595235c17a7 "x86, irq, PCI: Keep IRQ assignment for PCI
    devices during suspend/hibernation" has fixed the issue for suspend/
    hibernation, we also need the same fix for runtime device sleep too.

    Fix: https://bugzilla.kernel.org/show_bug.cgi?id=83271
    Reported-and-Tested-by: EmanueL Czirai
    Signed-off-by: Jiang Liu
    Cc: Konrad Rzeszutek Wilk
    Cc: Tony Luck
    Cc: Joerg Roedel
    Cc: Greg Kroah-Hartman
    Cc: EmanueL Czirai
    Cc: Benjamin Herrenschmidt
    Cc: Rafael J. Wysocki
    Cc: Bjorn Helgaas
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Cc: Borislav Petkov
    Cc: Grant Likely
    Link: http://lkml.kernel.org/r/1409304383-18806-1-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     
  • When performing a same-directory rename, it's possible that adding or
    setting the new directory entry will cause the directory to overflow
    the inline data area, which causes the directory to be converted to an
    extent-based directory. Under this circumstance it is necessary to
    re-read the directory when deleting the old dirent because the "old
    directory" context still points to i_block in the inode table, which
    is now an extent tree root! The delete fails with an FS error, and
    the subsequent fsck complains about incorrect link counts and
    hardlinked directories.

    Test case (originally found with flat_dir_test in the metadata_csum
    test program):

    # mkfs.ext4 -O inline_data /dev/sda
    # mount /dev/sda /mnt
    # mkdir /mnt/x
    # touch /mnt/x/changelog.gz /mnt/x/copyright /mnt/x/README.Debian
    # sync
    # for i in /mnt/x/*; do mv $i $i.longer; done
    # ls -la /mnt/x/
    total 0
    -rw-r--r-- 1 root root 0 Aug 25 12:03 changelog.gz.longer
    -rw-r--r-- 1 root root 0 Aug 25 12:03 copyright
    -rw-r--r-- 1 root root 0 Aug 25 12:03 copyright.longer
    -rw-r--r-- 1 root root 0 Aug 25 12:03 README.Debian.longer

    (Hey! Why are there four files now??)

    Signed-off-by: Darrick J. Wong
    Signed-off-by: Theodore Ts'o
    Cc: stable@vger.kernel.org

    Darrick J. Wong
     
  • It turns out that there are some serious problems with the on-disk
    format of journal checksum v2. The foremost is that the function to
    calculate descriptor tag size returns sizes that are too big. This
    causes alignment issues on some architectures and is compounded by the
    fact that some parts of jbd2 use the structure size (incorrectly) to
    determine the presence of a 64bit journal instead of checking the
    feature flags.

    Therefore, introduce journal checksum v3, which enlarges the
    descriptor block tag format to allow for full 32-bit checksums of
    journal blocks, fix the journal tag function to return the correct
    sizes, and fix the jbd2 recovery code to use feature flags to
    determine 64bitness.

    Add a few function helpers so we don't have to open-code quite so
    many pieces.

    Switching to a 16-byte block size was found to increase journal size
    overhead by a maximum of 0.1%, to convert a 32-bit journal with no
    checksumming to a 32-bit journal with checksum v3 enabled.

    Signed-off-by: Darrick J. Wong
    Reported-by: TR Reardon
    Signed-off-by: Theodore Ts'o
    Cc: stable@vger.kernel.org

    Darrick J. Wong
     
  • When recovering the journal, don't fall into an infinite loop if we
    encounter a corrupt journal block. Instead, just skip the block and
    return an error, which fails the mount and thus forces the user to run
    a full filesystem fsck.

    Signed-off-by: Darrick J. Wong
    Signed-off-by: Theodore Ts'o
    Cc: stable@vger.kernel.org

    Darrick J. Wong