04 Aug, 2014

2 commits


03 Aug, 2014

1 commit

  • Pull ARM fixes from Russell King:
    "A few fixes for ARM. Some of these are correctness issues:
    - TLBs must be flushed after the old mappings are removed by the DMA
    mapping code, but before the new mappings are established.
    - An off-by-one entry error in the Keystone LPAE setup code.

    Fixes include:
    - ensuring that the identity mapping for LPAE does not remove the
    kernel image from the identity map.
    - preventing userspace from trapping into kgdb.
    - fixing a preemption issue in the Intel iwmmxt code.
    - fixing a build error with nommu.

    Other changes include:
    - Adding a note about which areas of memory are expected to be
    accessible while the identity mapping tables are in place"

    * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
    ARM: 8124/1: don't enter kgdb when userspace executes a kgdb break instruction
    ARM: idmap: add identity mapping usage note
    ARM: 8115/1: LPAE: reduce damage caused by idmap to virtual memory layout
    ARM: fix alignment of keystone page table fixup
    ARM: 8112/1: only select ARM_PATCH_PHYS_VIRT if MMU is enabled
    ARM: 8100/1: Fix preemption disable in iwmmxt_task_enable()
    ARM: DMA: ensure that old section mappings are flushed from the TLB

    Linus Torvalds
     

02 Aug, 2014

9 commits

  • The kgdb breakpoint hooks (kgdb_brk_fn and kgdb_compiled_brk_fn)
    should only be entered when a kgdb break instruction is executed
    from the kernel. Otherwise, if kgdb is enabled, a userspace program
    can cause the kernel to drop into the debugger by executing either
    KGDB_BREAKINST or KGDB_COMPILED_BREAK.

    Acked-by: Will Deacon
    Signed-off-by: Omar Sandoval
    Signed-off-by: Russell King

    Omar Sandoval
     
  • Add a note about the usage of the identity mapping; we do not support
    accesses outside of the identity map region and kernel image while a
    CPU is using the identity map. This is because the identity mapping
    may overwrite vmalloc space, IO mappings, the vectors pages, etc.

    Acked-by: Will Deacon
    Signed-off-by: Russell King

    Russell King
     
  • Pull vfs fixes from Al Viro:
    "This contains a couple of fixes - one is the aio fix from Christoph,
    the other a fallocate() one from Eric"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    vfs: fix check for fallocate on active swapfile
    direct-io: fix AIO regression

    Linus Torvalds
     
  • Pull x86 fix from Peter Anvin:
    "A single fix to not invoke the espfix code on Xen PV, as it turns out
    to oops the guest when invoked after all. This patch leaves some
    amount of dead code, in particular unnecessary initialization of the
    espfix stacks when they won't be used, but in the interest of keeping
    the patch minimal that cleanup can wait for the next cycle"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86_64/entry/xen: Do not invoke espfix64 on Xen

    Linus Torvalds
     
  • Pull staging driver bugfixes from Greg KH:
    "Here are some tiny staging driver bugfixes that I've had in my tree
    for the past week that resolve some reported issues. Nothing major at
    all, but it would be good to get them merged for 3.16-rc8 or -final"

    * tag 'staging-3.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
    staging: vt6655: Fix disassociated messages every 10 seconds
    staging: vt6655: Fix Warning on boot handle_irq_event_percpu.
    staging: rtl8723au: rtw_resume(): release semaphore before exit on error
    iio:bma180: Missing check for frequency fractional part
    iio:bma180: Fix scale factors to report correct acceleration units
    iio: buffer: Fix demux table creation

    Linus Torvalds
     
  • Pull device mapper fixes from Mike Snitzer:
    "Fix dm bufio shrinker to properly zero-fill all fields.

    Fix race in dm cache that caused improper reporting of the number of
    dirty blocks in the cache"

    * tag 'dm-3.16-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
    dm cache: fix race affecting dirty block count
    dm bufio: fully initialize shrinker

    Linus Torvalds
     
  • Pull ARM straggler SoC fix from Olof Johansson:
    "A DT bugfix for Nomadik that had an ambigouos double-inversion of a
    gpio line, and one MAINTAINER URL update that might as well go in now.

    We could hold off until the merge window, but then we'll just have to
    mark the DT fix for stable and it just seems like in total causing
    more work"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    MAINTAINERS: Update Tegra Git URL
    ARM: nomadik: fix up double inversion in DT

    Linus Torvalds
     
  • nr_dirty is updated without locking, causing it to drift so that it is
    non-zero (either a small positive integer, or a very large one when an
    underflow occurs) even when there are no actual dirty blocks. This was
    due to a race between the workqueue and map function accessing nr_dirty
    in parallel without proper protection.

    People were seeing under runs due to a race on increment/decrement of
    nr_dirty, see: https://lkml.org/lkml/2014/6/3/648

    Fix this by using an atomic_t for nr_dirty.

    Reported-by: roma1390@gmail.com
    Signed-off-by: Anssi Hannula
    Signed-off-by: Joe Thornber
    Signed-off-by: Mike Snitzer
    Cc: stable@vger.kernel.org

    Anssi Hannula
     
  • 1d3d4437eae1 ("vmscan: per-node deferred work") added a flags field to
    struct shrinker assuming that all shrinkers were zero filled. The dm
    bufio shrinker is not zero filled, which leaves arbitrary kmalloc() data
    in flags. So far the only defined flags bit is SHRINKER_NUMA_AWARE.
    But there are proposed patches which add other bits to shrinker.flags
    (e.g. memcg awareness).

    Rather than simply initializing the shrinker, this patch uses kzalloc()
    when allocating the dm_bufio_client to ensure that the embedded shrinker
    and any other similar structures are zeroed.

    This fixes theoretical over aggressive shrinking of dm bufio objects.
    If the uninitialized dm_bufio_client.shrinker.flags contains
    SHRINKER_NUMA_AWARE then shrink_slab() would call the dm shrinker for
    each numa node rather than just once. This has been broken since 3.12.

    Signed-off-by: Greg Thelen
    Acked-by: Mikulas Patocka
    Signed-off-by: Mike Snitzer
    Cc: stable@vger.kernel.org # v3.12+

    Greg Thelen
     

01 Aug, 2014

7 commits

  • clockevents_increase_min_delta() calls printk() from under
    hrtimer_bases.lock. That causes lock inversion on scheduler locks because
    printk() can call into the scheduler. Lockdep puts it as:

    ======================================================
    [ INFO: possible circular locking dependency detected ]
    3.15.0-rc8-06195-g939f04b #2 Not tainted
    -------------------------------------------------------
    trinity-main/74 is trying to acquire lock:
    (&port_lock_key){-.....}, at: [] serial8250_console_write+0x8c/0x10c

    but task is already holding lock:
    (hrtimer_bases.lock){-.-...}, at: [] hrtimer_try_to_cancel+0x13/0x66

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -> #5 (hrtimer_bases.lock){-.-...}:
    [] lock_acquire+0x92/0x101
    [] _raw_spin_lock_irqsave+0x2e/0x3e
    [] __hrtimer_start_range_ns+0x1c/0x197
    [] perf_swevent_start_hrtimer.part.41+0x7a/0x85
    [] task_clock_event_start+0x3a/0x3f
    [] task_clock_event_add+0xd/0x14
    [] event_sched_in+0xb6/0x17a
    [] group_sched_in+0x44/0x122
    [] ctx_sched_in.isra.67+0x105/0x11f
    [] perf_event_sched_in.isra.70+0x47/0x4b
    [] __perf_install_in_context+0x8b/0xa3
    [] remote_function+0x12/0x2a
    [] smp_call_function_single+0x2d/0x53
    [] task_function_call+0x30/0x36
    [] perf_install_in_context+0x87/0xbb
    [] SYSC_perf_event_open+0x5c6/0x701
    [] SyS_perf_event_open+0x17/0x19
    [] syscall_call+0x7/0xb

    -> #4 (&ctx->lock){......}:
    [] lock_acquire+0x92/0x101
    [] _raw_spin_lock+0x21/0x30
    [] __perf_event_task_sched_out+0x1dc/0x34f
    [] __schedule+0x4c6/0x4cb
    [] schedule+0xf/0x11
    [] work_resched+0x5/0x30

    -> #3 (&rq->lock){-.-.-.}:
    [] lock_acquire+0x92/0x101
    [] _raw_spin_lock+0x21/0x30
    [] __task_rq_lock+0x33/0x3a
    [] wake_up_new_task+0x25/0xc2
    [] do_fork+0x15c/0x2a0
    [] kernel_thread+0x1a/0x1f
    [] rest_init+0x1a/0x10e
    [] start_kernel+0x303/0x308
    [] i386_start_kernel+0x79/0x7d

    -> #2 (&p->pi_lock){-.-...}:
    [] lock_acquire+0x92/0x101
    [] _raw_spin_lock_irqsave+0x2e/0x3e
    [] try_to_wake_up+0x1d/0xd6
    [] default_wake_function+0xb/0xd
    [] __wake_up_common+0x39/0x59
    [] __wake_up+0x29/0x3b
    [] tty_wakeup+0x49/0x51
    [] uart_write_wakeup+0x17/0x19
    [] serial8250_tx_chars+0xbc/0xfb
    [] serial8250_handle_irq+0x54/0x6a
    [] serial8250_default_handle_irq+0x19/0x1c
    [] serial8250_interrupt+0x38/0x9e
    [] handle_irq_event_percpu+0x5f/0x1e2
    [] handle_irq_event+0x2c/0x43
    [] handle_level_irq+0x57/0x80
    [] handle_irq+0x46/0x5c
    [] do_IRQ+0x32/0x89
    [] common_interrupt+0x2e/0x33
    [] _raw_spin_unlock_irqrestore+0x3f/0x49
    [] uart_start+0x2d/0x32
    [] uart_write+0xc7/0xd6
    [] n_tty_write+0xb8/0x35e
    [] tty_write+0x163/0x1e4
    [] redirected_tty_write+0x6d/0x75
    [] vfs_write+0x75/0xb0
    [] SyS_write+0x44/0x77
    [] syscall_call+0x7/0xb

    -> #1 (&tty->write_wait){-.....}:
    [] lock_acquire+0x92/0x101
    [] _raw_spin_lock_irqsave+0x2e/0x3e
    [] __wake_up+0x15/0x3b
    [] tty_wakeup+0x49/0x51
    [] uart_write_wakeup+0x17/0x19
    [] serial8250_tx_chars+0xbc/0xfb
    [] serial8250_handle_irq+0x54/0x6a
    [] serial8250_default_handle_irq+0x19/0x1c
    [] serial8250_interrupt+0x38/0x9e
    [] handle_irq_event_percpu+0x5f/0x1e2
    [] handle_irq_event+0x2c/0x43
    [] handle_level_irq+0x57/0x80
    [] handle_irq+0x46/0x5c
    [] do_IRQ+0x32/0x89
    [] common_interrupt+0x2e/0x33
    [] _raw_spin_unlock_irqrestore+0x3f/0x49
    [] uart_start+0x2d/0x32
    [] uart_write+0xc7/0xd6
    [] n_tty_write+0xb8/0x35e
    [] tty_write+0x163/0x1e4
    [] redirected_tty_write+0x6d/0x75
    [] vfs_write+0x75/0xb0
    [] SyS_write+0x44/0x77
    [] syscall_call+0x7/0xb

    -> #0 (&port_lock_key){-.....}:
    [] __lock_acquire+0x9ea/0xc6d
    [] lock_acquire+0x92/0x101
    [] _raw_spin_lock_irqsave+0x2e/0x3e
    [] serial8250_console_write+0x8c/0x10c
    [] call_console_drivers.constprop.31+0x87/0x118
    [] console_unlock+0x1d7/0x398
    [] vprintk_emit+0x3da/0x3e4
    [] printk+0x17/0x19
    [] clockevents_program_min_delta+0x104/0x116
    [] clockevents_program_event+0xe7/0xf3
    [] tick_program_event+0x1e/0x23
    [] hrtimer_force_reprogram+0x88/0x8f
    [] __remove_hrtimer+0x5b/0x79
    [] hrtimer_try_to_cancel+0x49/0x66
    [] hrtimer_cancel+0xd/0x18
    [] perf_swevent_cancel_hrtimer.part.60+0x2b/0x30
    [] task_clock_event_stop+0x20/0x64
    [] task_clock_event_del+0xd/0xf
    [] event_sched_out+0xab/0x11e
    [] group_sched_out+0x1d/0x66
    [] ctx_sched_out+0xaf/0xbf
    [] __perf_event_task_sched_out+0x1ed/0x34f
    [] __schedule+0x4c6/0x4cb
    [] schedule+0xf/0x11
    [] work_resched+0x5/0x30

    other info that might help us debug this:

    Chain exists of:
    &port_lock_key --> &ctx->lock --> hrtimer_bases.lock

    Possible unsafe locking scenario:

    CPU0 CPU1
    ---- ----
    lock(hrtimer_bases.lock);
    lock(&ctx->lock);
    lock(hrtimer_bases.lock);
    lock(&port_lock_key);

    *** DEADLOCK ***

    4 locks held by trinity-main/74:
    #0: (&rq->lock){-.-.-.}, at: [] __schedule+0xed/0x4cb
    #1: (&ctx->lock){......}, at: [] __perf_event_task_sched_out+0x1dc/0x34f
    #2: (hrtimer_bases.lock){-.-...}, at: [] hrtimer_try_to_cancel+0x13/0x66
    #3: (console_lock){+.+...}, at: [] vprintk_emit+0x3c7/0x3e4

    stack backtrace:
    CPU: 0 PID: 74 Comm: trinity-main Not tainted 3.15.0-rc8-06195-g939f04b #2
    00000000 81c3a310 8b995c14 81426f69 8b995c44 81425a99 8161f671 8161f570
    8161f538 8161f559 8161f538 8b995c78 8b142bb0 00000004 8b142fdc 8b142bb0
    8b995ca8 8104a62d 8b142fac 000016f2 81c3a310 00000001 00000001 00000003
    Call Trace:
    [] dump_stack+0x16/0x18
    [] print_circular_bug+0x18f/0x19c
    [] __lock_acquire+0x9ea/0xc6d
    [] lock_acquire+0x92/0x101
    [] ? serial8250_console_write+0x8c/0x10c
    [] ? wait_for_xmitr+0x76/0x76
    [] _raw_spin_lock_irqsave+0x2e/0x3e
    [] ? serial8250_console_write+0x8c/0x10c
    [] serial8250_console_write+0x8c/0x10c
    [] ? lock_release+0x191/0x223
    [] ? wait_for_xmitr+0x76/0x76
    [] call_console_drivers.constprop.31+0x87/0x118
    [] console_unlock+0x1d7/0x398
    [] vprintk_emit+0x3da/0x3e4
    [] printk+0x17/0x19
    [] clockevents_program_min_delta+0x104/0x116
    [] tick_program_event+0x1e/0x23
    [] hrtimer_force_reprogram+0x88/0x8f
    [] __remove_hrtimer+0x5b/0x79
    [] hrtimer_try_to_cancel+0x49/0x66
    [] hrtimer_cancel+0xd/0x18
    [] perf_swevent_cancel_hrtimer.part.60+0x2b/0x30
    [] task_clock_event_stop+0x20/0x64
    [] task_clock_event_del+0xd/0xf
    [] event_sched_out+0xab/0x11e
    [] group_sched_out+0x1d/0x66
    [] ctx_sched_out+0xaf/0xbf
    [] __perf_event_task_sched_out+0x1ed/0x34f
    [] ? __dequeue_entity+0x23/0x27
    [] ? pick_next_task_fair+0xb1/0x120
    [] __schedule+0x4c6/0x4cb
    [] ? trace_hardirqs_off_caller+0xd7/0x108
    [] ? trace_hardirqs_off+0xb/0xd
    [] ? rcu_irq_exit+0x64/0x77

    Fix the problem by using printk_deferred() which does not call into the
    scheduler.

    Reported-by: Fengguang Wu
    Signed-off-by: Jan Kara
    Cc: stable@vger.kernel.org
    Signed-off-by: Thomas Gleixner

    Jan Kara
     
  • Fix the broken check for calling sys_fallocate() on an active swapfile,
    introduced by commit 0790b31b69374ddadefe ("fs: disallow all fallocate
    operation on active swapfile").

    Signed-off-by: Eric Biggers
    Signed-off-by: Al Viro

    Eric Biggers
     
  • The direct-io.c rewrite to use the iov_iter infrastructure stopped updating
    the size field in struct dio_submit, and thus rendered the check for
    allowing asynchronous completions to always return false. Fix this by
    comparing it to the count of bytes in the iov_iter instead.

    Signed-off-by: Christoph Hellwig
    Reported-by: Tim Chen
    Tested-by: Tim Chen

    Christoph Hellwig
     
  • Pull ACPI fix from Rafael Wysocki:
    "One commit that fixes a problem causing PNP devices to be associated
    with wrong ACPI device objects sometimes during device enumeration due
    to an incorrect check in a matching function.

    That problem was uncovered by the ACPI device enumeration rework in
    3.14"

    * tag 'pm+acpi-3.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI / PNP: Fix acpi_pnp_match()

    Linus Torvalds
     
  • Pull clock driver fix from Mike Turquette:
    "A single patch to re-enable audio which is broken on all DRA7
    SoC-based platforms. Missed this one from the last set of fixes"

    * tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mike.turquette/linux:
    clk: ti: clk-7xx: Correct ABE DPLL configuration

    Linus Torvalds
     
  • Pull crypto fix from Herbert Xu:
    "This adds missing SELinux labeling to AF_ALG sockets which apparently
    causes SELinux (or at least the SELinux people) to misbehave :)"

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: af_alg - properly label AF_ALG socket

    Linus Torvalds
     
  • Pull SCSI barrier fix from James Bottomley:
    "This is a potential data corruption fix: If we get an error sending
    down a barrier, we simply ignore it meaning the barrier semantics get
    violated without anyone being any the wiser. If the system crashes at
    this point, the filesystem potentially becomes corrupt. Fix is to
    report errors on failed barriers"

    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
    scsi: handle flush errors properly

    Linus Torvalds
     

31 Jul, 2014

18 commits

  • ABE DPLL frequency need to be lowered from 361267200
    to 180633600 to facilitate the ATL requironments.
    The dpll_abe_m2x2_ck clock need to be set to double
    of ABE DPLL rate in order to have correct clocks
    for audio.

    Signed-off-by: Peter Ujfalusi
    Acked-by: Tero Kristo
    Signed-off-by: Mike Turquette

    Peter Ujfalusi
     
  • Th AF_ALG socket was missing a security label (e.g. SELinux)
    which means that socket was in "unlabeled" state.

    This was recently demonstrated in the cryptsetup package
    (cryptsetup v1.6.5 and later.)
    See https://bugzilla.redhat.com/show_bug.cgi?id=1115120

    This patch clones the sock's label from the parent sock
    and resolves the issue (similar to AF_BLUETOOTH protocol family).

    Cc: stable@vger.kernel.org
    Signed-off-by: Milan Broz
    Acked-by: Paul Moore
    Signed-off-by: Herbert Xu

    Milan Broz
     
  • free_huge_page() is undefined without CONFIG_HUGETLBFS and there's no
    need to filter PageHuge() page is such a configuration either, so avoid
    exporting the symbol to fix a build error:

    In file included from kernel/kexec.c:14:0:
    kernel/kexec.c: In function 'crash_save_vmcoreinfo_init':
    kernel/kexec.c:1623:20: error: 'free_huge_page' undeclared (first use in this function)
    VMCOREINFO_SYMBOL(free_huge_page);
    ^

    Introduced by commit 8f1d26d0e59b ("kexec: export free_huge_page to
    VMCOREINFO")

    Reported-by: kbuild test robot
    Acked-by: Olof Johansson
    Cc: Atsushi Kumagai
    Cc: Baoquan He
    Cc: Vivek Goyal
    Cc: Andrew Morton
    Signed-off-by: David Rientjes
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • Merge fixes from Andrew Morton:
    "10 fixes"

    * emailed patches from Andrew Morton :
    Josh has moved
    kexec: export free_huge_page to VMCOREINFO
    mm: fix filemap.c pagecache_get_page() kernel-doc warnings
    mm: debugfs: move rounddown_pow_of_two() out from do_fault path
    memcg: oom_notify use-after-free fix
    hwpoison: call action_result() in failure path of hwpoison_user_mappings()
    hwpoison: fix hugetlbfs/thp precheck in hwpoison_user_mappings()
    rapidio/tsi721_dma: fix failure to obtain transaction descriptor
    mm, thp: do not allow thp faults to avoid cpuset restrictions
    mm/page-writeback.c: fix divide by zero in bdi_dirty_limits()

    Linus Torvalds
     
  • My IBM email addresses haven't worked for years; also map some
    old-but-functional forwarding addresses to my canonical address.

    Update my GPG key fingerprint; I moved to 4096R a long time ago.

    Update description.

    Signed-off-by: Josh Triplett
    Cc: "Paul E. McKenney"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     
  • PG_head_mask was added into VMCOREINFO to filter huge pages in b3acc56bfe1
    ("kexec: save PG_head_mask in VMCOREINFO"), but makedumpfile still need
    another symbol to filter *hugetlbfs* pages.

    If a user hope to filter user pages, makedumpfile tries to exclude them by
    checking the condition whether the page is anonymous, but hugetlbfs pages
    aren't anonymous while they also be user pages.

    We know it's possible to detect them in the same way as PageHuge(),
    so we need the start address of free_huge_page():

    int PageHuge(struct page *page)
    {
    if (!PageCompound(page))
    return 0;

    page = compound_head(page);
    return get_compound_page_dtor(page) == free_huge_page;
    }

    For that reason, this patch changes free_huge_page() into public
    to export it to VMCOREINFO.

    Signed-off-by: Atsushi Kumagai
    Acked-by: Baoquan He
    Cc: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Kumagai
     
  • Fix kernel-doc warnings in mm/filemap.c: pagecache_get_page():

    Warning(..//mm/filemap.c:1054): No description found for parameter 'cache_gfp_mask'
    Warning(..//mm/filemap.c:1054): No description found for parameter 'radix_gfp_mask'
    Warning(..//mm/filemap.c:1054): Excess function parameter 'gfp_mask' description in 'pagecache_get_page'

    Fixes: 2457aec63745 ("mm: non-atomically mark page accessed during page cache allocation where possible")

    [mgorman@suse.de: change everything]
    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Randy Dunlap
    Cc: Mel Gorman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • do_fault_around() expects fault_around_bytes rounded down to nearest page
    order. Instead of calling rounddown_pow_of_two every time in
    fault_around_pages()/fault_around_mask() we could do round down when user
    changes fault_around_bytes via debugfs interface.

    This also fixes bug when user set fault_around_bytes to 0. Result of
    rounddown_pow_of_two(0) is not defined, therefore fault_around_bytes == 0
    doesn't work without this patch.

    Let's set fault_around_bytes to PAGE_SIZE if user sets to something less
    than PAGE_SIZE

    [akpm@linux-foundation.org: tweak code layout]
    Fixes: a9b0f861("mm: nominate faultaround area in bytes rather than page order")
    Signed-off-by: Andrey Ryabinin
    Reported-by: Sasha Levin
    Acked-by: Kirill A. Shutemov
    Cc: [3.15.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Ryabinin
     
  • Paul Furtado has reported the following GPF:

    general protection fault: 0000 [#1] SMP
    Modules linked in: ipv6 dm_mod xen_netfront coretemp hwmon x86_pkg_temp_thermal crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel ablk_helper cryptd lrw gf128mul glue_helper aes_x86_64 microcode pcspkr ext4 jbd2 mbcache raid0 xen_blkfront
    CPU: 3 PID: 3062 Comm: java Not tainted 3.16.0-rc5 #1
    task: ffff8801cfe8f170 ti: ffff8801d2ec4000 task.ti: ffff8801d2ec4000
    RIP: e030:mem_cgroup_oom_synchronize+0x140/0x240
    RSP: e02b:ffff8801d2ec7d48 EFLAGS: 00010283
    RAX: 0000000000000001 RBX: ffff88009d633800 RCX: 000000000000000e
    RDX: fffffffffffffffe RSI: ffff88009d630200 RDI: ffff88009d630200
    RBP: ffff8801d2ec7da8 R08: 0000000000000012 R09: 00000000fffffffe
    R10: 0000000000000000 R11: 0000000000000000 R12: ffff88009d633800
    R13: ffff8801d2ec7d48 R14: dead000000100100 R15: ffff88009d633a30
    FS: 00007f1748bb4700(0000) GS:ffff8801def80000(0000) knlGS:0000000000000000
    CS: e033 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: 00007f4110300308 CR3: 00000000c05f7000 CR4: 0000000000002660
    Call Trace:
    pagefault_out_of_memory+0x18/0x90
    mm_fault_error+0xa9/0x1a0
    __do_page_fault+0x478/0x4c0
    do_page_fault+0x2c/0x40
    page_fault+0x28/0x30
    Code: 44 00 00 48 89 df e8 40 ca ff ff 48 85 c0 49 89 c4 74 35 4c 8b b0 30 02 00 00 4c 8d b8 30 02 00 00 4d 39 fe 74 1b 0f 1f 44 00 00 8b 7e 10 be 01 00 00 00 e8 42 d2 04 00 4d 8b 36 4d 39 fe 75
    RIP mem_cgroup_oom_synchronize+0x140/0x240

    Commit fb2a6fc56be6 ("mm: memcg: rework and document OOM waiting and
    wakeup") has moved mem_cgroup_oom_notify outside of memcg_oom_lock
    assuming it is protected by the hierarchical OOM-lock.

    Although this is true for the notification part the protection doesn't
    cover unregistration of event which can happen in parallel now so
    mem_cgroup_oom_notify can see already unlinked and/or freed
    mem_cgroup_eventfd_list.

    Fix this by using memcg_oom_lock also in mem_cgroup_oom_notify.

    Addresses https://bugzilla.kernel.org/show_bug.cgi?id=80881

    Fixes: fb2a6fc56be6 (mm: memcg: rework and document OOM waiting and wakeup)
    Signed-off-by: Michal Hocko
    Reported-by: Paul Furtado
    Tested-by: Paul Furtado
    Acked-by: Johannes Weiner
    Cc: [3.12+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michal Hocko
     
  • hwpoison_user_mappings() could fail for various reasons, so printk()s to
    print out the reasons should be done in each failure check inside
    hwpoison_user_mappings().

    And currently we don't call action_result() when hwpoison_user_mappings()
    fails, which is not consistent with other exit points of memory error
    handler. So this patch fixes these messaging problems.

    Signed-off-by: Naoya Horiguchi
    Cc: Andi Kleen
    Cc: Chen Yucong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Naoya Horiguchi
     
  • A recent fix from Chen Yucong, commit 0bc1f8b0682c ("hwpoison: fix the
    handling path of the victimized page frame that belong to non-LRU")
    rejects going into unmapping operation for hugetlbfs/thp pages, which
    results in failing error containing on such pages. This patch fixes it.

    With this patch, hwpoison functional tests in mce-test testsuite pass.

    Signed-off-by: Naoya Horiguchi
    Cc: Andi Kleen
    Cc: Chen Yucong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Naoya Horiguchi
     
  • This is a bug fix for the situation when function tsi721_desc_get() fails
    to obtain a free transaction descriptor.

    The bug usually results in a memory access crash dump when data transfer
    scatter-gather list has more entries than size of hardware buffer
    descriptors ring. This fix ensures that error is properly returned to a
    caller instead of an invalid entry.

    This patch is applicable to kernel versions starting from v3.5.

    Signed-off-by: Alexandre Bounine
    Cc: Matt Porter
    Cc: Andre van Herk
    Cc: Stef van Os
    Cc: Vinod Koul
    Cc: Dan Williams
    Cc: [3.5+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexandre Bounine
     
  • The page allocator relies on __GFP_WAIT to determine if ALLOC_CPUSET
    should be set in allocflags. ALLOC_CPUSET controls if a page allocation
    should be restricted only to the set of allowed cpuset mems.

    Transparent hugepages clears __GFP_WAIT when defrag is disabled to prevent
    the fault path from using memory compaction or direct reclaim. Thus, it
    is unfairly able to allocate outside of its cpuset mems restriction as a
    side-effect.

    This patch ensures that ALLOC_CPUSET is only cleared when the gfp mask is
    truly GFP_ATOMIC by verifying it is also not a thp allocation.

    Signed-off-by: David Rientjes
    Reported-by: Alex Thorlton
    Tested-by: Alex Thorlton
    Cc: Bob Liu
    Cc: Dave Hansen
    Cc: Hedi Berriche
    Cc: Hugh Dickins
    Cc: Johannes Weiner
    Cc: Kirill A. Shutemov
    Cc: Mel Gorman
    Cc: Rik van Riel
    Cc: Srivatsa S. Bhat
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • Under memory pressure, it is possible for dirty_thresh, calculated by
    global_dirty_limits() in balance_dirty_pages(), to equal zero. Then, if
    strictlimit is true, bdi_dirty_limits() tries to resolve the proportion:

    bdi_bg_thresh : bdi_thresh = background_thresh : dirty_thresh

    by dividing by zero.

    Signed-off-by: Maxim Patlasov
    Acked-by: Rik van Riel
    Cc: Michal Hocko
    Cc: KOSAKI Motohiro
    Cc: Wu Fengguang
    Cc: Johannes Weiner
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Maxim Patlasov
     
  • swarren/linux-tegra.git is a stale location; it has moved to
    tegra/linux.git.

    While the git protocol re-directs to the new location, HTTP does not.
    Besides, MAINTAINERS should contain the canonical URL.

    Signed-off-by: Andreas Färber
    [swarren, updated commit message]
    Signed-off-by: Stephen Warren
    Signed-off-by: Olof Johansson

    Andreas Färber
     
  • The GPIO pin connected to card detect was inverted twice: once by
    the argument to the GPIO line itself where it was magically marked
    as active low by the flag GPIO_ACTIVE_LOW (0x01) in the third cell,
    and also marked active low AGAIN by explicitly stating
    "cd-inverted" (a deprecated method).

    After commit 78f87df2b4f8760954d7d80603d0cfcbd4759683
    "mmc: mmci: Use the common mmc DT parser" this results in the
    line being inverted twice so it was effectively uninverted, while
    the old code would not have this effect, instead disregarding the
    flag on the GPIO line altogether, which is a bug. I admit the
    semantics may be unclear but inverting twice is as good a
    definition as any on how this should work.

    So fix up the buggy device tree. Use proper #includes so the DTS
    is clear and readable.

    Cc: Ulf Hansson
    Signed-off-by: Linus Walleij
    Signed-off-by: Olof Johansson

    Linus Walleij
     
  • Pull Exynos platform DT fix from Grant Likely:
    "Device tree Exynos bug fix for v3.16-rc7

    This bug fix has been brewing for a while. I hate sending it to you
    so late, but I only got confirmation that it solves the problem this
    past weekend. The diff looks big for a bug fix, but the majority of
    it is only executed in the Exynos quirk case. Unfortunately it
    required splitting early_init_dt_scan() in two and adding quirk
    handling in the middle of it on ARM.

    Exynos has buggy firmware that puts bad data into the memory node.
    Commit 1c2f87c22566 ("ARM: Get rid of meminfo") exposed the bug by
    dropping the artificial upper bound on the number of memory banks that
    can be added. Exynos fails to boot after that commit. This branch
    fixes it by splitting the early DT parse function and inserting a
    fixup hook. Exynos uses the hook to correct the DT before parsing
    memory regions"

    * tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux:
    arm: Add devicetree fixup machine function
    of: Add memory limiting function for flattened devicetrees
    of: Split early_init_dt_scan into two parts

    Linus Torvalds
     
  • Pull Xen fix from David Vrabel:
    "Fix BUG when trying to expand the grant table. This seems to occur
    often during boot with Ubuntu 14.04 PV guests"

    * tag 'stable/for-linus-3.16-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    x86/xen: safely map and unmap grant frames when in atomic context

    Linus Torvalds
     

30 Jul, 2014

3 commits

  • Pull KVM fix from Paolo Bonzini:
    "Fix a bug which allows KVM guests to bring down the entire system on
    some 64K enabled ARM64 hosts"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    kvm: arm64: vgic: fix hyp panic with 64k pages on juno platform

    Linus Torvalds
     
  • This reverts commit 20fbe3ae990fd54fc7d1f889d61958bc8b38f254.

    As reported by Stephen Rothwell, it causes compile failures in certain
    configurations:

    drivers/net/usb/cdc_subset.c:360:15: error: 'dummy_prereset' undeclared here (not in a function)
    .pre_reset = dummy_prereset,
    ^
    drivers/net/usb/cdc_subset.c:361:16: error: 'dummy_postreset' undeclared here (not in a function)
    .post_reset = dummy_postreset,
    ^

    Reported-by: Stephen Rothwell
    Acked-by: David Miller
    Cc: Oliver Neukum
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Pull networking fixes from David Miller:

    1) Make fragmentation IDs less predictable, from Eric Dumazet.

    2) TSO tunneling can crash in bnx2x driver, fix from Dmitry Kravkov.

    3) Don't allow NULL msg->msg_name just because msg->msg_namelen is
    non-zero, from Andrey Ryabinin.

    4) ndm->ndm_type set using wrong macros, from Jun Zhao.

    5) cdc-ether devices can come up with entries in their address filter,
    so explicitly clear the filter after the device initializes. From
    Oliver Neukum.

    6) Forgotten refcount bump in xfrm_lookup(), from Steffen Klassert.

    7) Short packets not padded properly, exposing random data, in bcmgenet
    driver. Fix from Florian Fainelli.

    8) xgbe_probe() doesn't return an error code, but rather zero, when
    netif_set_real_num_tx_queues() fails. Fix from Wei Yongjun.

    9) USB speed not probed properly in r8152 driver, from Hayes Wang.

    10) Transmit logic choosing the outgoing port in the sunvnet driver
    needs to consider a) is the port actually up and b) whether it is a
    switch port. Fix from David L Stevens.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits)
    net: phy: re-apply PHY fixups during phy_register_device
    cdc-ether: clean packet filter upon probe
    cdc_subset: deal with a device that needs reset for timeout
    net: sendmsg: fix NULL pointer dereference
    isdn/bas_gigaset: fix a leak on failure path in gigaset_probe()
    ip: make IP identifiers less predictable
    neighbour : fix ndm_type type error issue
    sunvnet: only use connected ports when sending
    can: c_can_platform: Fix raminit, use devm_ioremap() instead of devm_ioremap_resource()
    bnx2x: fix crash during TSO tunneling
    r8152: fix the checking of the usb speed
    net: phy: Ensure the MDIO bus module is held
    net: phy: Set the driver when registering an MDIO bus device
    bnx2x: fix set_setting for some PHYs
    hyperv: Fix error return code in netvsc_init_buf()
    amd-xgbe: Fix error return code in xgbe_probe()
    ath9k: fix aggregation session lockup
    net: bcmgenet: correctly pad short packets
    net: sctp: inherit auth_capable on INIT collisions
    mac80211: fix crash on getting sta info with uninitialized rate control
    ...

    Linus Torvalds