1. 25 Jul, 2016 11 commits
    • Linus Torvalds's avatar
      Merge branch 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 766fd5f6
      Linus Torvalds authored
      Pull NOHZ updates from Ingo Molnar:
      
       - fix system/idle cputime leaked on cputime accounting (all nohz
         configs) (Rik van Riel)
      
       - remove the messy, ad-hoc irqtime account on nohz-full and make it
         compatible with CONFIG_IRQ_TIME_ACCOUNTING=y instead (Rik van Riel)
      
       - cleanups (Frederic Weisbecker)
      
       - remove unecessary irq disablement in the irqtime code (Rik van Riel)
      
      * 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/cputime: Drop local_irq_save/restore from irqtime_account_irq()
        sched/cputime: Reorganize vtime native irqtime accounting headers
        sched/cputime: Clean up the old vtime gen irqtime accounting completely
        sched/cputime: Replace VTIME_GEN irq time code with IRQ_TIME_ACCOUNTING code
        sched/cputime: Count actually elapsed irq & softirq time
      766fd5f6
    • Linus Torvalds's avatar
      Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · cca08cd6
      Linus Torvalds authored
      Pull scheduler updates from Ingo Molnar:
      
       - introduce and use task_rcu_dereference()/try_get_task_struct() to fix
         and generalize task_struct handling (Oleg Nesterov)
      
       - do various per entity load tracking (PELT) fixes and optimizations
         (Peter Zijlstra)
      
       - cputime virt-steal time accounting enhancements/fixes (Wanpeng Li)
      
       - introduce consolidated cputime output file cpuacct.usage_all and
         related refactorings (Zhao Lei)
      
       - ... plus misc fixes and enhancements
      
      * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/core: Panic on scheduling while atomic bugs if kernel.panic_on_warn is set
        sched/cpuacct: Introduce cpuacct.usage_all to show all CPU stats together
        sched/cpuacct: Use loop to consolidate code in cpuacct_stats_show()
        sched/cpuacct: Merge cpuacct_usage_index and cpuacct_stat_index enums
        sched/fair: Rework throttle_count sync
        sched/core: Fix sched_getaffinity() return value kerneldoc comment
        sched/fair: Reorder cgroup creation code
        sched/fair: Apply more PELT fixes
        sched/fair: Fix PELT integrity for new tasks
        sched/cgroup: Fix cpu_cgroup_fork() handling
        sched/fair: Fix PELT integrity for new groups
        sched/fair: Fix and optimize the fork() path
        sched/cputime: Add steal time support to full dynticks CPU time accounting
        sched/cputime: Fix prev steal time accouting during CPU hotplug
        KVM: Fix steal clock warp during guest CPU hotplug
        sched/debug: Always show 'nr_migrations'
        sched/fair: Use task_rcu_dereference()
        sched/api: Introduce task_rcu_dereference() and try_get_task_struct()
        sched/idle: Optimize the generic idle loop
        sched/fair: Fix the wrong throttled clock time for cfs_rq_clock_task()
      cca08cd6
    • Linus Torvalds's avatar
      Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7e4dc77b
      Linus Torvalds authored
      Pull perf updates from Ingo Molnar:
       "With over 300 commits it's been a busy cycle - with most of the work
        concentrated on the tooling side (as it should).
      
        The main kernel side enhancements were:
      
         - Add per event callchain limit: Recently we introduced a sysctl to
           tune the max-stack for all events for which callchains were
           requested:
      
             $ sysctl kernel.perf_event_max_stack
             kernel.perf_event_max_stack = 127
      
           Now this patch introduces a way to configure this per event, i.e.
           this becomes possible:
      
             $ perf record -e sched:*/max-stack=2/ -e block:*/max-stack=10/ -a
      
           allowing finer tuning of how much buffer space callchains use.
      
           This uses an u16 from the reserved space at the end, leaving
           another u16 for future use.
      
           There has been interest in even finer tuning, namely to control the
           max stack for kernel and userspace callchains separately.  Further
           discussion is needed, we may for instance use the remaining u16 for
           that and when it is present, assume that the sample_max_stack
           introduced in this patch applies for the kernel, and the u16 left
           is used for limiting the userspace callchain (Arnaldo Carvalho de
           Melo)
      
         - Optimize AUX event (hardware assisted side-band event) delivery
           (Kan Liang)
      
         - Rework Intel family name macro usage (this is partially x86 arch
           work) (Dave Hansen)
      
         - Refine and fix Intel LBR support (David Carrillo-Cisneros)
      
         - Add support for Intel 'TopDown' events (Andi Kleen)
      
         - Intel uncore PMU driver fixes and enhancements (Kan Liang)
      
         - ... other misc changes.
      
        Here's an incomplete list of the tooling enhancements (but there's
        much more, see the shortlog and the git log for details):
      
         - Support cross unwinding, i.e.  collecting '--call-graph dwarf'
           perf.data files in one machine and then doing analysis in another
           machine of a different hardware architecture.  This enables, for
           instance, to do:
      
             $ perf record -a --call-graph dwarf
      
           on a x86-32 or aarch64 system and then do 'perf report' on it on a
           x86_64 workstation (He Kuang)
      
         - Allow reading from a backward ring buffer (one setup via
           sys_perf_event_open() with perf_event_attr.write_backward = 1)
           (Wang Nan)
      
         - Finish merging initial SDT (Statically Defined Traces) support, see
           cset comments for details about how it all works (Masami Hiramatsu)
      
         - Support attaching eBPF programs to tracepoints (Wang Nan)
      
         - Add demangling of symbols in programs written in the Rust language
           (David Tolnay)
      
         - Add support for tracepoints in the python binding, including an
           example, that sets up and parses sched:sched_switch events,
           tools/perf/python/tracepoint.py (Jiri Olsa)
      
         - Introduce --stdio-color to set up the color output mode selection
           in 'annotate' and 'report', allowing emit color escape sequences
           when redirecting the output of these tools (Arnaldo Carvalho de
           Melo)
      
         - Add 'callindent' option to 'perf script -F', to indent the Intel PT
           call stack, making this output more ftrace-like (Adrian Hunter,
           Andi Kleen)
      
         - Allow dumping the object files generated by llvm when processing
           eBPF scriptlet events (Wang Nan)
      
         - Add stackcollapse.py script to help generating flame graphs (Paolo
           Bonzini)
      
         - Add --ldlat option to 'perf mem' to specify load latency for loads
           event (e.g. cpu/mem-loads/ ) (Jiri Olsa)
      
         - Tooling support for Intel TopDown counters, recently added to the
           kernel (Andi Kleen)"
      
      * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (303 commits)
        perf tests: Add is_printable_array test
        perf tools: Make is_printable_array global
        perf script python: Fix string vs byte array resolving
        perf probe: Warn unmatched function filter correctly
        perf cpu_map: Add more helpers
        perf stat: Balance opening and reading events
        tools: Copy linux/{hash,poison}.h and check for drift
        perf tools: Remove include/linux/list.h from perf's MANIFEST
        tools: Copy the bitops files accessed from the kernel and check for drift
        Remove: kernel unistd*h files from perf's MANIFEST, not used
        perf tools: Remove tools/perf/util/include/linux/const.h
        perf tools: Remove tools/perf/util/include/asm/byteorder.h
        perf tools: Add missing linux/compiler.h include to perf-sys.h
        perf jit: Remove some no-op error handling
        perf jit: Add missing curly braces
        objtool: Initialize variable to silence old compiler
        objtool: Add -I$(srctree)/tools/arch/$(ARCH)/include/uapi
        perf record: Add --tail-synthesize option
        perf session: Don't warn about out of order event if write_backward is used
        perf tools: Enable overwrite settings
        ...
      7e4dc77b
    • Linus Torvalds's avatar
      Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 89e7eb09
      Linus Torvalds authored
      Pull RAS updates from Ingo Molnar:
       "The biggest change in this cycle was an enhancement by Yazen Ghannam
        to reduce the number of MCE error injection related IPIs.
      
        The rest are smaller fixes"
      
      * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mce: Fix mce_rdmsrl() warning message
        x86/RAS/AMD: Reduce the number of IPIs when prepping error injection
        x86/mce/AMD: Increase size of the bank_map type
        x86/mce: Do not use bank 1 for APEI generated error logs
      89e7eb09
    • Linus Torvalds's avatar
      Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c86ad14d
      Linus Torvalds authored
      Pull locking updates from Ingo Molnar:
       "The locking tree was busier in this cycle than the usual pattern - a
        couple of major projects happened to coincide.
      
        The main changes are:
      
         - implement the atomic_fetch_{add,sub,and,or,xor}() API natively
           across all SMP architectures (Peter Zijlstra)
      
         - add atomic_fetch_{inc/dec}() as well, using the generic primitives
           (Davidlohr Bueso)
      
         - optimize various aspects of rwsems (Jason Low, Davidlohr Bueso,
           Waiman Long)
      
         - optimize smp_cond_load_acquire() on arm64 and implement LSE based
           atomic{,64}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()
           on arm64 (Will Deacon)
      
         - introduce smp_acquire__after_ctrl_dep() and fix various barrier
           mis-uses and bugs (Peter Zijlstra)
      
         - after discovering ancient spin_unlock_wait() barrier bugs in its
           implementation and usage, strengthen its semantics and update/fix
           usage sites (Peter Zijlstra)
      
         - optimize mutex_trylock() fastpath (Peter Zijlstra)
      
         - ... misc fixes and cleanups"
      
      * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (67 commits)
        locking/atomic: Introduce inc/dec variants for the atomic_fetch_$op() API
        locking/barriers, arch/arm64: Implement LDXR+WFE based smp_cond_load_acquire()
        locking/static_keys: Fix non static symbol Sparse warning
        locking/qspinlock: Use __this_cpu_dec() instead of full-blown this_cpu_dec()
        locking/atomic, arch/tile: Fix tilepro build
        locking/atomic, arch/m68k: Remove comment
        locking/atomic, arch/arc: Fix build
        locking/Documentation: Clarify limited control-dependency scope
        locking/atomic, arch/rwsem: Employ atomic_long_fetch_add()
        locking/atomic, arch/qrwlock: Employ atomic_fetch_add_acquire()
        locking/atomic, arch/mips: Convert to _relaxed atomics
        locking/atomic, arch/alpha: Convert to _relaxed atomics
        locking/atomic: Remove the deprecated atomic_{set,clear}_mask() functions
        locking/atomic: Remove linux/atomic.h:atomic_fetch_or()
        locking/atomic: Implement atomic{,64,_long}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()
        locking/atomic: Fix atomic64_relaxed() bits
        locking/atomic, arch/xtensa: Implement atomic_fetch_{add,sub,and,or,xor}()
        locking/atomic, arch/x86: Implement atomic{,64}_fetch_{add,sub,and,or,xor}()
        locking/atomic, arch/tile: Implement atomic{,64}_fetch_{add,sub,and,or,xor}()
        locking/atomic, arch/sparc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}()
        ...
      c86ad14d
    • Linus Torvalds's avatar
      Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a2303849
      Linus Torvalds authored
      Pull EFI updates from Ingo Molnar:
       "The biggest change in this cycle were SGI/UV related changes that
        clean up and fix UV boot quirks and problems.
      
        There's also various smaller cleanups and refinements"
      
      * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi: Reorganize the GUID table to make it easier to read
        x86/efi: Remove the unused efi_get_time() function
        x86/efi: Update efi_thunk() to use the the arch_efi_call_virt*() macros
        x86/uv: Update uv_bios_call() to use efi_call_virt_pointer()
        efi: Convert efi_call_virt() to efi_call_virt_pointer()
        x86/efi: Remove unused variable 'efi'
        efi: Document #define FOO_PROTOCOL_GUID layout
        efibc: Report more information in the error messages
      a2303849
    • Linus Torvalds's avatar
      Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · df00ccca
      Linus Torvalds authored
      Pull RCU updates from Ingo Molnar:
       "The main changes in this cycle were:
      
         - documentation updates
      
         - miscellaneous fixes
      
         - minor reorganization of code
      
         - torture-test updates"
      
      * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (30 commits)
        rcu: Correctly handle sparse possible cpus
        rcu: sysctl: Panic on RCU Stall
        rcu: Fix a typo in a comment
        rcu: Make call_rcu_tasks() tolerate first call with irqs disabled
        rcu: Disable TASKS_RCU for usermode Linux
        rcu: No ordering for rcu_assign_pointer() of NULL
        rcutorture: Fix error return code in rcu_perf_init()
        torture: Inflict default jitter
        rcuperf: Don't treat gp_exp mis-setting as a WARN
        rcutorture: Drop "-soundhw pcspkr" from x86 boot arguments
        rcutorture: Don't specify the cpu type of QEMU on PPC
        rcutorture: Make -soundhw a x86 specific option
        rcutorture: Use vmlinux as the fallback kernel image
        rcutorture/doc: Create initrd using dracut
        torture: Stop onoff task if there is only one cpu
        torture: Add starvation events to error summary
        torture:  Break online and offline functions out of torture_onoff()
        torture: Forgive lengthy trace dumps and preemption
        torture: Remove CONFIG_RCU_TORTURE_TEST_RUNNABLE, simplify code
        torture: Simplify code, eliminate RCU_PERF_TEST_RUNNABLE
        ...
      df00ccca
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus-v4.8' of... · dd950695
      Linus Torvalds authored
      Merge tag 'hwmon-for-linus-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon updates from Guenter Roeck:
      
       - New drivers for FTS BMC "Teutates", TI INA3221, and Sensirion SHT3x.
      
       - Added support for Microchip MCP9808 and TI TMP461.
      
       - Cleanup and minor fixes in various drivers.
      
      * tag 'hwmon-for-linus-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (37 commits)
        Documentation: dtb: xgene: Add hwmon dts binding documentation
        hwmon: (ftsteutates) Remove unused including <linux/version.h>
        hwmon: (adt7411) set bit 3 in CFG1 register
        hwmon: Add driver for FTS BMC chip "Teutates"
        hwmon: (sht3x) add humidity heater element control
        hwmon: (jc42) Add support for generic JC-42.4 devicetree binding
        dt/bindings: Add bindings for JC-42.4 compatible temperature sensors
        hwmon: (tmp102) Convert to use regmap, and drop local cache
        hwmon: (tmp102) Rework chip configuration
        hwmon: (tmp102) Improve handling of initial read delay
        hwmon: (lm90) Drop unnecessary else statements
        hwmon: (lm90) Use bool for valid flag
        hwmon: (lm90) Read limit registers only once
        hwmon: (lm90) Simplify read functions
        hwmon: (lm90) Use devm_hwmon_device_register_with_groups
        hwmon: (lm90) Use devm_add_action for cleanup
        hwmon: (lm75) Convert to use regmap
        hwmon: (lm75) Add update_interval attribute
        hwmon: (lm75) Drop lm75_read_value and lm75_write_value
        hwmon: (lm75) Handle cleanup with devm_add_action
        ...
      dd950695
    • Linus Torvalds's avatar
      Merge tag 'renesas-sh-drivers-for-v4.8' of... · 52770c37
      Linus Torvalds authored
      Merge tag 'renesas-sh-drivers-for-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas
      
      Pull SH drivers updates from Simon Horman:
       "Drop use of SH Drivers on Renesas ARM Based SoCs.
      
        I expect this to be my last pull request for these drivers as it
        removes usage of them from Renesas ARM Based SoCs and my
        co-maintenance of them.
      
        The drivers are still used by some SH SoCs and listed under SUPERH in
        the MAINTAINERS file"
      
      * tag 'renesas-sh-drivers-for-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
        MAINTAINERS: Drop drivers/sh/ for Renesas ARM
        drivers: sh: Stop using the legacy clock domain on ARM
      52770c37
    • Linus Torvalds's avatar
      Merge tag 'usb-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · b7545b79
      Linus Torvalds authored
      Pull USB updates from Greg KH:
       "Here's the big USB driver update for 4.8-rc1.  Lots of the normal
        stuff in here, musb, gadget, xhci, and other updates and fixes.  All
        of the details are in the shortlog.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'usb-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (169 commits)
        cdc-acm: beautify probe()
        cdc-wdm: use the common CDC parser
        cdc-acm: cleanup error handling
        cdc-acm: use the common parser
        usbnet: move the CDC parser into USB core
        usb: musb: sunxi: Simplify dr_mode handling
        usb: musb: sunxi: make unexported symbols static
        usb: musb: cppi41: add dma channel tracepoints
        usb: musb: cppi41: move struct cppi41_dma_channel to header
        usb: musb: cleanup cppi_dma header
        usb: musb: gadget: add usb-request tracepoints
        usb: musb: host: add urb tracepoints
        usb: musb: add tracepoints to dump interrupt events
        usb: musb: add tracepoints for register access
        usb: musb: dsps: use musb register read/write wrappers instead
        usb: musb: switch dev_dbg to tracepoints
        usb: musb: add tracepoints support for debugging
        usb: quirks: Add no-lpm quirk for Elan
        phy: rcar-gen3-usb2: fix mutex_lock calling in interrupt
        phy: rockhip-usb: use devm_add_action_or_reset()
        ...
      b7545b79
    • Linus Torvalds's avatar
      Merge tag 'tty-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 721413af
      Linus Torvalds authored
      Pull tty/serial driver updates from Greg KH:
       "Here is the big tty and serial driver update for 4.8-rc1.
      
        Lots of good cleanups from Jiri on a number of vt and other tty
        related things, and the normal driver updates.  Full details are in
        the shortlog.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'tty-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (90 commits)
        tty/serial: atmel: enforce tasklet init and termination sequences
        serial: sh-sci: Stop transfers in sci_shutdown()
        serial: 8250_ingenic: drop #if conditional surrounding earlycon code
        serial: 8250_mtk: drop !defined(MODULE) conditional
        serial: 8250_uniphier: drop !defined(MODULE) conditional
        earlycon: mark earlycon code as __used iif the caller is built-in
        tty/serial/8250: use mctrl_gpio helpers
        serial: mctrl_gpio: enable API usage only for initialized mctrl_gpios struct
        serial: mctrl_gpio: add modem control read routine
        tty/serial/8250: make UART_MCR register access consistent
        serial: 8250_mid: Read RX buffer on RX DMA timeout for DNV
        serial: 8250_dma: Export serial8250_rx_dma_flush()
        dmaengine: hsu: Export hsu_dma_get_status()
        tty: serial: 8250: add CON_CONSDEV to flags
        tty: serial: samsung: add byte-order aware bit functions
        tty: serial: samsung: fixup accessors for endian
        serial: sirf: make fifo functions static
        serial: mps2-uart: make driver explicitly non-modular
        serial: mvebu-uart: free the IRQ in ->shutdown()
        serial/bcm63xx_uart: use correct alias naming
        ...
      721413af
  2. 24 Jul, 2016 5 commits
    • Linus Torvalds's avatar
      Merge tag 'staging-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 25a0dc4b
      Linus Torvalds authored
      Pull staging and IIO driver updates from Greg KH:
       "Here is the big Staging and IIO driver update for 4.8-rc1.
      
        We ended up adding more code than removing, again, but it's not all
        that bad.  Lots of cleanups all over the staging tree, and new IIO
        drivers, full details in the shortlog.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'staging-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (417 commits)
        drivers:iio:accel:mma8452: removed unwanted return statements
        drivers:iio:accel:mma8452: added cleanup provision in case of failure.
        iio: Add iio.git tree to MAINTAINERS
        iio:st_pressure: clean useless static channel initializers
        iio:st_pressure:lps22hb: temperature support
        iio:st_pressure:lps22hb: open drain support
        iio:st_pressure: temperature triggered buffering
        iio:st_pressure: document sampling gains
        iio:st_pressure: align storagebits on power of 2
        iio:st_sensors: align on storagebits boundaries
        staging:iio:lis3l02dq drop separate driver
        iio: accel: st_accel: Add lis3l02dq support
        iio: adc: add missing of_node references to iio_dev
        iio: adc: ti-ads1015: add indio_dev->dev.of_node reference
        iio: potentiometer: Fix typo in Kconfig
        iio: potentiometer: mcp4531: Add device tree binding
        iio: potentiometer: mcp4531: Add device tree binding documentation
        iio: potentiometer: mcp4531: Add support for MCP454x, MCP456x, MCP464x and MCP466x
        iio:imu:mpu6050: icm20608 initial support
        iio: adc: max1363: Add device tree binding
        ...
      25a0dc4b
    • Linus Torvalds's avatar
      Merge tag 'char-misc-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 9d0be76f
      Linus Torvalds authored
      Pull char/misc driver updates from Greg KH:
       "Here is the big char/misc driver update for 4.8-rc1.
      
        Not a lot of stuff, but it's all over the place, full details are in
        the shortlog.  All of these have been in linux-next with no reported
        issues for a while"
      
      * tag 'char-misc-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (49 commits)
        lkdtm: silence warnings about function declarations
        lkdtm: hide unused functions
        intel_th: pci: Add Kaby Lake PCH-H support
        intel_th: Fix a deadlock in modprobing
        dsp56k: prevent a harmless underflow
        chardev: add missing line break in pr_warn
        lkdtm: use struct arrays instead of enums
        lkdtm: move jprobe entry points to start of source
        lkdtm: reorganize module paramaters
        lkdtm: rename globals for clarity
        lkdtm: rename "count" to "crash_count"
        lkdtm: remove intentional off-by-one array access
        lkdtm: split remaining logic bug tests to separate file
        lkdtm: split heap corruption tests to separate file
        lkdtm: split memory permissions tests to separate file
        lkdtm: split usercopy tests to separate file
        lkdtm: drop "alloc_size" parameter
        lkdtm: add usercopy test for blocking kernel text
        extcon: adc-jack: add suspend/resume support
        extcon: add missing of_node_put after calling of_parse_phandle
        ...
      9d0be76f
    • Linus Torvalds's avatar
      Merge tag 'gfs2-4.7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · b403f230
      Linus Torvalds authored
      Pull gfs2 updates from Bob Peterson:
       "We've got ten patches this time, half of which are related to a
        plethora of nasty outcomes when inodes are transitioned from the
        unlinked state to the free state.  Small file systems are particularly
        vulnerable to these problems, and it can manifest as mainly hangs, but
        also file system corruption.  The patches have been tested for
        literally many weeks, with a very gruelling test, so I have a high
        level of confidence.
      
         - Andreas Gruenbacher wrote a series of five patches for various
           lockups during the transition of inodes from unlinked to free.
      
           The main patch is titled "Fix gfs2_lookup_by_inum lock inversion"
           and the other four are support and cleanup patches related to that.
      
         - Ben Marzinski contributed two patches with regard to a recreatable
           problem when gfs2 tries to write a page to a file that is being
           truncated, resulting in a BUG() in gfs2_remove_from_journal.
      
           Note that Ben had to export vfs function __block_write_full_page to
           get this to work properly.  It's been posted a long time and he
           talked to various VFS people about it, and nobody seemed to mind.
      
         - I contributed 3 patches:
             o The first one fixes a memory corruptor: a race in which one
               process can overwrite the gl_object pointer set by another
               process, causing kernel panic and other symptoms.
             o The second patch fixes another race that resulted in a
               false-positive BUG_ON.  This occurred when resource group
               reservations were freed by one process while another process
               was trying to grab a new reservation in the same resource
               group.
             o The third patch fixes a problem with doing journal replay when
               the journals are not all the same size"
      
      * tag 'gfs2-4.7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        GFS2: Fix gfs2_replay_incr_blk for multiple journal sizes
        GFS2: Check rs_free with rd_rsspin protection
        gfs2: writeout truncated pages
        fs: export __block_write_full_page
        gfs2: Lock holder cleanup
        gfs2: Large-filesystem fix for 32-bit systems
        gfs2: Get rid of gfs2_ilookup
        gfs2: Fix gfs2_lookup_by_inum lock inversion
        gfs2: Initialize iopen glock holder for new inodes
        GFS2: don't set rgrp gl_object until it's inserted into rgrp tree
      b403f230
    • Linus Torvalds's avatar
      Linux 4.7 · 523d939e
      Linus Torvalds authored
      523d939e
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-4.7-rc8' of git://github.com/ceph/ceph-client · 68093c43
      Linus Torvalds authored
      Pull ceph fix from Ilya Dryomov:
       "A fix for a long-standing bug in the incremental osdmap handling code
        that caused misdirected requests, tagged for stable"
      
        The tag is signed with a brand new key - Sage is on vacation and I
        didn't anticipate this"
      
      * tag 'ceph-for-4.7-rc8' of git://github.com/ceph/ceph-client:
        libceph: apply new_state before new_up_client on incrementals
      68093c43
  3. 23 Jul, 2016 22 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 107df032
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix memory leak in nftables, from Liping Zhang.
      
       2) Need to check result of vlan_insert_tag() in batman-adv otherwise we
          risk NULL skb derefs, from Sven Eckelmann.
      
       3) Check for dev_alloc_skb() failures in cfg80211, from Gregory
          Greenman.
      
       4) Handle properly when we have ppp_unregister_channel() happening in
          parallel with ppp_connect_channel(), from WANG Cong.
      
       5) Fix DCCP deadlock, from Eric Dumazet.
      
       6) Bail out properly in UDP if sk_filter() truncates the packet to be
          smaller than even the space that the protocol headers need.  From
          Michal Kubecek.
      
       7) Similarly for rose, dccp, and sctp, from Willem de Bruijn.
      
       8) Make TCP challenge ACKs less predictable, from Eric Dumazet.
      
       9) Fix infinite loop in bgmac_dma_tx_add() from Florian Fainelli.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (65 commits)
        packet: propagate sock_cmsg_send() error
        net/mlx5e: Fix del vxlan port command buffer memset
        packet: fix second argument of sock_tx_timestamp()
        net: switchdev: change ageing_time type to clock_t
        Update maintainer for EHEA driver.
        net/mlx4_en: Add resilience in low memory systems
        net/mlx4_en: Move filters cleanup to a proper location
        sctp: load transport header after sk_filter
        net/sched/sch_htb: clamp xstats tokens to fit into 32-bit int
        net: cavium: liquidio: Avoid dma_unmap_single on uninitialized ndata
        net: nb8800: Fix SKB leak in nb8800_receive()
        et131x: Fix logical vs bitwise check in et131x_tx_timeout()
        vlan: use a valid default mtu value for vlan over macsec
        net: bgmac: Fix infinite loop in bgmac_dma_tx_add()
        mlxsw: spectrum: Prevent invalid ingress buffer mapping
        mlxsw: spectrum: Prevent overwrite of DCB capability fields
        mlxsw: spectrum: Don't emit errors when PFC is disabled
        mlxsw: spectrum: Indicate support for autonegotiation
        mlxsw: spectrum: Force link training according to admin state
        r8152: add MODULE_VERSION
        ...
      107df032
    • Linus Torvalds's avatar
      Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs · 88083e98
      Linus Torvalds authored
      Pull overlayfs fixes from Miklos Szeredi:
       "This contains a fix for a potential crash/corruption issue and another
        where the suid/sgid bits weren't cleared on write"
      
      * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
        ovl: verify upper dentry in ovl_remove_and_whiteout()
        ovl: Copy up underlying inode's ->i_mode to overlay inode
        ovl: handle ATTR_KILL*
      88083e98
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · b1386ced
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "Five fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        pps: do not crash when failed to register
        tools/vm/slabinfo: fix an unintentional printf
        testing/radix-tree: fix a macro expansion bug
        radix-tree: fix radix_tree_iter_retry() for tagged iterators.
        mm: memcontrol: fix cgroup creation failure after many small jobs
      b1386ced
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-v4.7-rc8-intel-kbl' of git://people.freedesktop.org/~airlied/linux · d15ae814
      Linus Torvalds authored
      Pull intel kabylake drm fixes from Dave Airlie:
       "As mentioned Intel has gathered all the Kabylake fixes from -next,
        which we've enabled in 4.7 for the first time, these are pretty much
        limited in scope to only affects kabylake, which is hw that isn't
        shipping yet.  So I'm mostly okay with it going in now.
      
        If we don't land this, it might be a good idea to disable kabylake
        support in 4.7 before we ship"
      
      * tag 'drm-fixes-for-v4.7-rc8-intel-kbl' of git://people.freedesktop.org/~airlied/linux: (28 commits)
        drm/i915/kbl: Introduce the first official DMC for Kabylake.
        drm/i915: Introduce Kabypoint PCH for Kabylake H/DT.
        drm/i915/gen9: implement WaConextSwitchWithConcurrentTLBInvalidate
        drm/i915/gen9: Add WaFbcHighMemBwCorruptionAvoidance
        drm/i195/fbc: Add WaFbcNukeOnHostModify
        drm/i915/gen9: Add WaFbcWakeMemOn
        drm/i915/gen9: Add WaFbcTurnOffFbcWatermark
        drm/i915/kbl: Add WaClearSlmSpaceAtContextSwitch
        drm/i915/gen9: Add WaEnableChickenDCPR
        drm/i915/kbl: Add WaDisableSbeCacheDispatchPortSharing
        drm/i915/kbl: Add WaDisableGafsUnitClkGating
        drm/i915/kbl: Add WaForGAMHang
        drm/i915: Add WaInsertDummyPushConstP for bxt and kbl
        drm/i915/kbl: Add WaDisableDynamicCreditSharing
        drm/i915/kbl: Add WaDisableGamClockGating
        drm/i915/gen9: Enable must set chicken bits in config0 reg
        drm/i915/kbl: Add WaDisableLSQCROPERFforOCL
        drm/i915/kbl: Add WaDisableSDEUnitClockGating
        drm/i915/kbl: Add WaDisableFenceDestinationToSLM for A0
        drm/i915/kbl: Add WaEnableGapsTsvCreditFix
        ...
      d15ae814
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-v4.7-rc8-intel' of git://people.freedesktop.org/~airlied/linux · 3f2625d7
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Two i915 regression fixes.
      
        Intel have submitted some Kabylake fixes I'll send separately, since
        this is the first kernel with kabylake support and they don't go much
        outside that area I think they should be fine"
      
      * tag 'drm-fixes-for-v4.7-rc8-intel' of git://people.freedesktop.org/~airlied/linux:
        drm/i915: add missing condition for committing planes on crtc
        drm/i915: Treat eDP as always connected, again
      3f2625d7
    • Linus Torvalds's avatar
      Merge tag 'm68k-for-v4.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · 23218843
      Linus Torvalds authored
      Pull m68k upddates from Geert Uytterhoeven:
       - assorted spelling fixes
       - defconfig updates
      
      * tag 'm68k-for-v4.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        m68k/defconfig: Update defconfigs for v4.7-rc2
        m68k: Assorted spelling fixes
      23218843
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 7825e0c4
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "A handful of fixes before final release:
      
        Marvell Armada:
         - One to fix a typo in the devicetree specifying memory ranges for
           the crypto engine
         - Two to deal with marking PCI and device-memory as strongly ordered
           to avoid hardware deadlocks, in particular when enabling above
           crypto driver.
         - Compile fix for PM
      
        Allwinner:
         - DT clock fixes to deal with u-boot-enabled framebuffer (simplefb).
         - Make R8 (C.H.I.P. SoC) inherit system compatibility from A13 to
           make clocks register proper.
      
        Tegra:
         - Fix SD card voltage setting on the Tegra3 Beaver dev board
      
        Misc:
         - Two maintainers updates for STM32 and STi platforms"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: tegra: beaver: Allow SD card voltage to be changed
        MAINTAINERS: update STi maintainer list
        MAINTAINERS: update STM32 maintainers list
        ARM: mvebu: compile pm code conditionally
        ARM: dts: sun7i: Fix pll3x2 and pll7x2 not having a parent clock
        ARM: dts: sunxi: Add pll3 to simplefb nodes clocks lists
        ARM: dts: armada-38x: fix MBUS_ID for crypto SRAM on Armada 385 Linksys
        ARM: mvebu: map PCI I/O regions strongly ordered
        ARM: mvebu: fix HW I/O coherency related deadlocks
        ARM: sunxi/dt: make the CHIP inherit from allwinner,sun5i-a13
      7825e0c4
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 48d4ca56
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
       "This fixes a sporadic build failure in the qat driver as well as a
        memory corruption bug in rsa-pkcs1pad"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: rsa-pkcs1pad - fix rsa-pkcs1pad request struct
        crypto: qat - make qat_asym_algs.o depend on asn1 headers
      48d4ca56
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · 897473fc
      Linus Torvalds authored
      Pull key handling fixes from James Morris:
       "Quoting David Howells:
      
        Here are three miscellaneous fixes:
      
        (1) Fix a panic in some debugging code in PKCS#7.  This can only
            happen by explicitly inserting a #define DEBUG into the code.
      
        (2) Fix the calculation of the digest length in the PE file parser.
            This causes a failure where there should be a success.
      
        (3) Fix the case where an X.509 cert can be added as an asymmetric key
            to a trusted keyring with no trust restriction if no AKID is
            supplied.
      
        Bugs (1) and (2) aren't particularly problematic, but (3) allows a
        security check to be bypassed.  Happily, this is a recent regression
        and never made it into a released kernel"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        KEYS: Fix for erroneous trust of incorrectly signed X.509 certs
        pefile: Fix the failure of calculation for digest
        PKCS#7: Fix panic when referring to the empty AKID when DEBUG defined
      897473fc
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 3aa536d9
      Linus Torvalds authored
      Pull input fixes from Dmitry Torokhov:
       "A few more fixes for the input subsystem:
      
         - restore naming for tsc2005 touchscreens as some userspace match on it
         - fix out of bound access in legacy keyboard driver
         - fixup in RMI4 driver
      
        Everything is tagged for stable as well"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: tsc200x - report proper input_dev name
        tty/vt/keyboard: fix OOB access in do_compute_shiftstate()
        Input: synaptics-rmi4 - fix maximum size check for F12 control register 8
      3aa536d9
    • Linus Torvalds's avatar
      Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · f1894d83
      Linus Torvalds authored
      Pull libnvdimm fix from Dan Williams:
       "This contains a regression fix for a problem that was introduced in
        v4.7-rc6.
      
        In 4.7-rc1 we introduced auto-probing for the ACPI DSM (device-
        specific-method) format that the platform firmware implements for
        nvdimm devices.  We initially fixed a regression in probing the QEMU
        DSM implementation by making acpi_check_dsm() tolerant of the way QEMU
        reports the "0 DSMs supported" condition.
      
        However, that broke HPE platforms since that tolerance caused the
        driver to mistakenly match the 1-zero-byte response those platforms
        give to "unknown" commands.  Instead, we simply make the driver
        tolerant of not finding any supported DSMs.  This has been tested to
        work with both QEMU and HPE platforms.
      
        This commit has appeared in a -next release with no reported issues"
      
      * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        nfit: make DIMM DSMs optional
      f1894d83
    • Linus Torvalds's avatar
      Merge tag 'gpio-v4.7-6' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · ee62f09b
      Linus Torvalds authored
      Pull GPIO fix from Linus Walleij:
       "Compile problem fix for Tegra,
      
        Sorry to send this in the last minute but Ingo says this build failure
        is very prominent so I'm not going to wait for v4.7 before sending it.
      
        It is a case of COMPILE_TEST causing more problems than it solves and
        I'm already swearing about me shooting myself in the foot with that
        gun :("
      
      * tag 'gpio-v4.7-6' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        gpio: tegra: don't auto-enable for COMPILE_TEST
      ee62f09b
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 62cd69d5
      Linus Torvalds authored
      Pull clk fixes from Michael Turquette:
       "Fix a bug in the at91 clk driver, two compile time warnings in sunxi
        clk drivers, and one bug in a sunxi clk driver introduced in the 4.7
        merge window"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: at91: fix clk_programmable_set_parent()
        clk: sunxi: remove unused variable
        clk: sunxi: display: Add per-clock flags
        clk: sunxi: tcon-ch1: Do not return a negative error in get_parent
      62cd69d5
    • Linus Torvalds's avatar
      Merge branch 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata · a933f80d
      Linus Torvalds authored
      Pull libata fix from Tejun Heo:
       "Another fallout from max_sectors bump a couple years ago.  The lite-on
        optical drive times out on large requests"
      
      * 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
        libata: LITE-ON CX1-JB256-HP needs lower max_sectors
      a933f80d
    • Linus Torvalds's avatar
      Merge tag 'mmc-v4.7-rc7' of git://git.linaro.org/people/ulf.hansson/mmc · ea4b3cfa
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
       "Here are a few late mmc fixes intended for v4.7 final.
      
        MMC core:
         - Fix eMMC packed command header endianness
         - Fix free of uninitialized buffer for mmc ioctl
      
        MMC host:
         - pxamci: Fix potential oops in ->probe()"
      
      * tag 'mmc-v4.7-rc7' of git://git.linaro.org/people/ulf.hansson/mmc:
        mmc: pxamci: fix potential oops
        mmc: block: fix packed command header endianness
        mmc: block: fix free of uninitialized 'idata->buf'
      ea4b3cfa
    • Linus Torvalds's avatar
      Merge tag 'sound-4.7-fix2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · b6cbecae
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "No surprise, just a few small fixes: a couple of changes are seen in
        the core part, and both of them are rather for unusual error paths.
      
        The rest are the regular HD-audio fixes and one USB-audio regression
        fix"
      
      * tag 'sound-4.7-fix2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: usb-audio: Fix quirks code is not called
        ALSA: hda: add AMD Stoney PCI ID with proper driver caps
        ALSA: hda - fix use-after-free after module unload
        ALSA: pcm: Free chmap at PCM free callback, too
        ALSA: ctl: Stop notification after disconnection
        ALSA: hda/realtek - add new pin definition in alc225 pin quirk table
      b6cbecae
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · ff8d6fac
      Linus Torvalds authored
      Pull NVMe fix from Jens Axboe:
       "Late addition here, it's basically a revert of a patch that was added
        in this merge window, but has proven to cause problems.
      
        This is swapping out the RCU based namespace protection with a good
        old mutex instead"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        nvme: Remove RCU namespace protection
      ff8d6fac
    • Jiri Slaby's avatar
      pps: do not crash when failed to register · 368301f2
      Jiri Slaby authored
      With this command sequence:
      
        modprobe plip
        modprobe pps_parport
        rmmod pps_parport
      
      the partport_pps modules causes this crash:
      
        BUG: unable to handle kernel NULL pointer dereference at (null)
        IP: parport_detach+0x1d/0x60 [pps_parport]
        Oops: 0000 [#1] SMP
        ...
        Call Trace:
          parport_unregister_driver+0x65/0xc0 [parport]
          SyS_delete_module+0x187/0x210
      
      The sequence that builds up to this is:
      
       1) plip is loaded and takes the parport device for exclusive use:
      
          plip0: Parallel port at 0x378, using IRQ 7.
      
       2) pps_parport then fails to grab the device:
      
          pps_parport: parallel port PPS client
          parport0: cannot grant exclusive access for device pps_parport
          pps_parport: couldn't register with parport0
      
       3) rmmod of pps_parport is then killed because it tries to access
          pardev->name, but pardev (taken from port->cad) is NULL.
      
      So add a check for NULL in the test there too.
      
      Link: http://lkml.kernel.org/r/20160714115245.12651-1-jslaby@suse.czSigned-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Acked-by: default avatarRodolfo Giometti <giometti@enneenne.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      368301f2
    • Dan Carpenter's avatar
      tools/vm/slabinfo: fix an unintentional printf · 2d6a4d64
      Dan Carpenter authored
      The curly braces are missing here so we print stuff unintentionally.
      
      Fixes: 9da4714a ('slub: slabinfo update for cmpxchg handling')
      Link: http://lkml.kernel.org/r/20160715211243.GE19522@mwandaSigned-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: default avatarChristoph Lameter <cl@linux.com>
      Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Cc: Colin Ian King <colin.king@canonical.com>
      Cc: Laura Abbott <labbott@fedoraproject.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2d6a4d64
    • Dan Carpenter's avatar
      testing/radix-tree: fix a macro expansion bug · b301aac5
      Dan Carpenter authored
      There are no parentheses around this macro and it causes a problem when
      we do:
      
      	index = rand() % THRASH_SIZE;
      
      Link: http://lkml.kernel.org/r/20160715210953.GC19522@mwandaSigned-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: default avatarRoss Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b301aac5
    • Andrey Ryabinin's avatar
      radix-tree: fix radix_tree_iter_retry() for tagged iterators. · 3cb9185c
      Andrey Ryabinin authored
      radix_tree_iter_retry() resets slot to NULL, but it doesn't reset tags.
      Then NULL slot and non-zero iter.tags passed to radix_tree_next_slot()
      leading to crash:
      
        RIP: radix_tree_next_slot include/linux/radix-tree.h:473
          find_get_pages_tag+0x334/0x930 mm/filemap.c:1452
        ....
        Call Trace:
          pagevec_lookup_tag+0x3a/0x80 mm/swap.c:960
          mpage_prepare_extent_to_map+0x321/0xa90 fs/ext4/inode.c:2516
          ext4_writepages+0x10be/0x2b20 fs/ext4/inode.c:2736
          do_writepages+0x97/0x100 mm/page-writeback.c:2364
          __filemap_fdatawrite_range+0x248/0x2e0 mm/filemap.c:300
          filemap_write_and_wait_range+0x121/0x1b0 mm/filemap.c:490
          ext4_sync_file+0x34d/0xdb0 fs/ext4/fsync.c:115
          vfs_fsync_range+0x10a/0x250 fs/sync.c:195
          vfs_fsync fs/sync.c:209
          do_fsync+0x42/0x70 fs/sync.c:219
          SYSC_fdatasync fs/sync.c:232
          SyS_fdatasync+0x19/0x20 fs/sync.c:230
          entry_SYSCALL_64_fastpath+0x23/0xc1 arch/x86/entry/entry_64.S:207
      
      We must reset iterator's tags to bail out from radix_tree_next_slot()
      and go to the slow-path in radix_tree_next_chunk().
      
      Fixes: 46437f9a ("radix-tree: fix race in gang lookup")
      Link: http://lkml.kernel.org/r/1468495196-10604-1-git-send-email-aryabinin@virtuozzo.comSigned-off-by: default avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Acked-by: default avatarKonstantin Khlebnikov <koct9i@gmail.com>
      Cc: Matthew Wilcox <willy@linux.intel.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3cb9185c
    • Johannes Weiner's avatar
      mm: memcontrol: fix cgroup creation failure after many small jobs · 73f576c0
      Johannes Weiner authored
      The memory controller has quite a bit of state that usually outlives the
      cgroup and pins its CSS until said state disappears.  At the same time
      it imposes a 16-bit limit on the CSS ID space to economically store IDs
      in the wild.  Consequently, when we use cgroups to contain frequent but
      small and short-lived jobs that leave behind some page cache, we quickly
      run into the 64k limitations of outstanding CSSs.  Creating a new cgroup
      fails with -ENOSPC while there are only a few, or even no user-visible
      cgroups in existence.
      
      Although pinning CSSs past cgroup removal is common, there are only two
      instances that actually need an ID after a cgroup is deleted: cache
      shadow entries and swapout records.
      
      Cache shadow entries reference the ID weakly and can deal with the CSS
      having disappeared when it's looked up later.  They pose no hurdle.
      
      Swap-out records do need to pin the css to hierarchically attribute
      swapins after the cgroup has been deleted; though the only pages that
      remain swapped out after offlining are tmpfs/shmem pages.  And those
      references are under the user's control, so they are manageable.
      
      This patch introduces a private 16-bit memcg ID and switches swap and
      cache shadow entries over to using that.  This ID can then be recycled
      after offlining when the CSS remains pinned only by objects that don't
      specifically need it.
      
      This script demonstrates the problem by faulting one cache page in a new
      cgroup and deleting it again:
      
        set -e
        mkdir -p pages
        for x in `seq 128000`; do
          [ $((x % 1000)) -eq 0 ] && echo $x
          mkdir /cgroup/foo
          echo $$ >/cgroup/foo/cgroup.procs
          echo trex >pages/$x
          echo $$ >/cgroup/cgroup.procs
          rmdir /cgroup/foo
        done
      
      When run on an unpatched kernel, we eventually run out of possible IDs
      even though there are no visible cgroups:
      
        [root@ham ~]# ./cssidstress.sh
        [...]
        65000
        mkdir: cannot create directory '/cgroup/foo': No space left on device
      
      After this patch, the IDs get released upon cgroup destruction and the
      cache and css objects get released once memory reclaim kicks in.
      
      [hannes@cmpxchg.org: init the IDR]
        Link: http://lkml.kernel.org/r/20160621154601.GA22431@cmpxchg.org
      Fixes: b2052564 ("mm: memcontrol: continue cache reclaim from offlined groups")
      Link: http://lkml.kernel.org/r/20160617162516.GD19084@cmpxchg.orgSigned-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Reported-by: default avatarJohn Garcia <john.garcia@mesosphere.io>
      Reviewed-by: default avatarVladimir Davydov <vdavydov@virtuozzo.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Nikolay Borisov <kernel@kyup.com>
      Cc: <stable@vger.kernel.org>	[3.19+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      73f576c0
  4. 22 Jul, 2016 2 commits
    • Arnd Bergmann's avatar
      gpio: tegra: don't auto-enable for COMPILE_TEST · 0bfb85c6
      Arnd Bergmann authored
      I stumbled over a build error with COMPILE_TEST and CONFIG_OF
      disabled:
      
      drivers/gpio/gpio-tegra.c: In function 'tegra_gpio_probe':
      drivers/gpio/gpio-tegra.c:603:9: error: 'struct gpio_chip' has no member named 'of_node'
      
      The problem is that the newly added GPIO_TEGRA Kconfig symbol
      does not have a dependency on CONFIG_OF. However, there is another
      problem here as the driver gets enabled unconditionally whenever
      COMPILE_TEST is set.
      
      This fixes both problems, by making the symbol user-visible
      when COMPILE_TEST is set and default-enabled for ARCH_TEGRA=y.
      
      As a side-effect, it is now possible to compile-test a Tegra
      kernel with GPIO support disabled, which is harmless.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: 4dd4dd1d ("gpio: tegra: Allow compile test")
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      0bfb85c6
    • Ilya Dryomov's avatar
      libceph: apply new_state before new_up_client on incrementals · 930c5328
      Ilya Dryomov authored
      Currently, osd_weight and osd_state fields are updated in the encoding
      order.  This is wrong, because an incremental map may look like e.g.
      
          new_up_client: { osd=6, addr=... } # set osd_state and addr
          new_state: { osd=6, xorstate=EXISTS } # clear osd_state
      
      Suppose osd6's current osd_state is EXISTS (i.e. osd6 is down).  After
      applying new_up_client, osd_state is changed to EXISTS | UP.  Carrying
      on with the new_state update, we flip EXISTS and leave osd6 in a weird
      "!EXISTS but UP" state.  A non-existent OSD is considered down by the
      mapping code
      
      2087    for (i = 0; i < pg->pg_temp.len; i++) {
      2088            if (ceph_osd_is_down(osdmap, pg->pg_temp.osds[i])) {
      2089                    if (ceph_can_shift_osds(pi))
      2090                            continue;
      2091
      2092                    temp->osds[temp->size++] = CRUSH_ITEM_NONE;
      
      and so requests get directed to the second OSD in the set instead of
      the first, resulting in OSD-side errors like:
      
      [WRN] : client.4239 192.168.122.21:0/2444980242 misdirected client.4239.1:2827 pg 2.5df899f2 to osd.4 not [1,4,6] in e680/680
      
      and hung rbds on the client:
      
      [  493.566367] rbd: rbd0: write 400000 at 11cc00000 (0)
      [  493.566805] rbd: rbd0:   result -6 xferred 400000
      [  493.567011] blk_update_request: I/O error, dev rbd0, sector 9330688
      
      The fix is to decouple application from the decoding and:
      - apply new_weight first
      - apply new_state before new_up_client
      - twiddle osd_state flags if marking in
      - clear out some of the state if osd is destroyed
      
      Fixes: http://tracker.ceph.com/issues/14901
      
      Cc: stable@vger.kernel.org # 3.15+: 6dd74e44: libceph: set 'exists' flag for newly up osd
      Cc: stable@vger.kernel.org # 3.15+
      Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
      Reviewed-by: default avatarJosh Durgin <jdurgin@redhat.com>
      930c5328