1. 27 Sep, 2019 14 commits
    • Linus Torvalds's avatar
      Merge tag '9p-for-5.4' of git://github.com/martinetd/linux · 9977b1a7
      Linus Torvalds authored
      Pull 9p updates from Dominique Martinet:
       "Some of the usual small fixes and cleanup.
      
        Small fixes all around:
         - avoid overlayfs copy-up for PRIVATE mmaps
         - KUMSAN uninitialized warning for transport error
         - one syzbot memory leak fix in 9p cache
         - internal API cleanup for v9fs_fill_super"
      
      * tag '9p-for-5.4' of git://github.com/martinetd/linux:
        9p/vfs_super.c: Remove unused parameter data in v9fs_fill_super
        9p/cache.c: Fix memory leak in v9fs_cache_session_get_cookie
        9p: Transport error uninitialized
        9p: avoid attaching writeback_fid on mmap with type PRIVATE
      9977b1a7
    • Linus Torvalds's avatar
      Merge tag 'riscv/for-v5.4-rc1-b' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 568d850e
      Linus Torvalds authored
      Pull more RISC-V updates from Paul Walmsley:
       "Some additional RISC-V updates.
      
        This includes one significant fix:
      
         - Prevent interrupts from being unconditionally re-enabled during
           exception handling if they were disabled in the context in which
           the exception occurred
      
        Also a few other fixes:
      
         - Fix a build error when sparse memory support is manually enabled
      
         - Prevent CPUs beyond CONFIG_NR_CPUS from being enabled in early boot
      
        And a few minor improvements:
      
         - DT improvements: in the FU540 SoC DT files, improve U-Boot
           compatibility by adding an "ethernet0" alias, drop an unnecessary
           property from the DT files, and add support for the PWM device
      
         - KVM preparation: add a KVM-related macro for future RISC-V KVM
           support, and export some symbols required to build KVM support as
           modules
      
         - defconfig additions: build more drivers by default for QEMU
           configurations"
      
      * tag 'riscv/for-v5.4-rc1-b' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: Avoid interrupts being erroneously enabled in handle_exception()
        riscv: dts: sifive: Drop "clock-frequency" property of cpu nodes
        riscv: dts: sifive: Add ethernet0 to the aliases node
        RISC-V: Export kernel symbols for kvm
        KVM: RISC-V: Add KVM_REG_RISCV for ONE_REG interface
        arch/riscv: disable excess harts before picking main boot hart
        RISC-V: Enable VIRTIO drivers in RV64 and RV32 defconfig
        RISC-V: Fix building error when CONFIG_SPARSEMEM_MANUAL=y
        riscv: dts: Add DT support for SiFive FU540 PWM driver
      568d850e
    • Linus Torvalds's avatar
      Merge tag 'nios2-v5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 · 70570a64
      Linus Torvalds authored
      Pull nios2 fix from Ley Foon Tan:
       "Make sure the command line buffer is NUL-terminated"
      
      * tag 'nios2-v5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
        nios2: force the string buffer NULL-terminated
      70570a64
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 8bbe0dec
      Linus Torvalds authored
      Pull more KVM updates from Paolo Bonzini:
       "x86 KVM changes:
      
         - The usual accuracy improvements for nested virtualization
      
         - The usual round of code cleanups from Sean
      
         - Added back optimizations that were prematurely removed in 5.2 (the
           bare minimum needed to fix the regression was in 5.3-rc8, here
           comes the rest)
      
         - Support for UMWAIT/UMONITOR/TPAUSE
      
         - Direct L2->L0 TLB flushing when L0 is Hyper-V and L1 is KVM
      
         - Tell Windows guests if SMT is disabled on the host
      
         - More accurate detection of vmexit cost
      
         - Revert a pvqspinlock pessimization"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (56 commits)
        KVM: nVMX: cleanup and fix host 64-bit mode checks
        KVM: vmx: fix build warnings in hv_enable_direct_tlbflush() on i386
        KVM: x86: Don't check kvm_rebooting in __kvm_handle_fault_on_reboot()
        KVM: x86: Drop ____kvm_handle_fault_on_reboot()
        KVM: VMX: Add error handling to VMREAD helper
        KVM: VMX: Optimize VMX instruction error and fault handling
        KVM: x86: Check kvm_rebooting in kvm_spurious_fault()
        KVM: selftests: fix ucall on x86
        Revert "locking/pvqspinlock: Don't wait if vCPU is preempted"
        kvm: nvmx: limit atomic switch MSRs
        kvm: svm: Intercept RDPRU
        kvm: x86: Add "significant index" flag to a few CPUID leaves
        KVM: x86/mmu: Skip invalid pages during zapping iff root_count is zero
        KVM: x86/mmu: Explicitly track only a single invalid mmu generation
        KVM: x86/mmu: Revert "KVM: x86/mmu: Remove is_obsolete() call"
        KVM: x86/mmu: Revert "Revert "KVM: MMU: reclaim the zapped-obsolete page first""
        KVM: x86/mmu: Revert "Revert "KVM: MMU: collapse TLB flushes when zap all pages""
        KVM: x86/mmu: Revert "Revert "KVM: MMU: zap pages in batch""
        KVM: x86/mmu: Revert "Revert "KVM: MMU: add tracepoint for kvm_mmu_invalidate_all_pages""
        KVM: x86/mmu: Revert "Revert "KVM: MMU: show mmu_valid_gen in shadow page related tracepoints""
        ...
      8bbe0dec
    • Linus Torvalds's avatar
      Merge tag 'pwm/for-5.4-rc1' of... · e37e3bc7
      Linus Torvalds authored
      Merge tag 'pwm/for-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm updates from Thierry Reding:
       "Besides one new driver being added for the PWM controller found in
        various Spreadtrum SoCs, this series of changes brings a slew of,
        mostly minor, fixes and cleanups for existing drivers, as well as some
        enhancements to the core code.
      
        Lastly, Uwe is added to the PWM subsystem entry of the MAINTAINERS
        file, making official his role as a reviewer"
      
      * tag 'pwm/for-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (34 commits)
        MAINTAINERS: Add myself as reviewer for the PWM subsystem
        MAINTAINERS: Add patchwork link for PWM entry
        MAINTAINERS: Add a selection of PWM related keywords to the PWM entry
        pwm: mediatek: Add MT7629 compatible string
        dt-bindings: pwm: Update bindings for MT7629 SoC
        pwm: mediatek: Update license and switch to SPDX tag
        pwm: mediatek: Use pwm_mediatek as common prefix
        pwm: mediatek: Allocate the clks array dynamically
        pwm: mediatek: Remove the has_clks field
        pwm: mediatek: Drop the check for of_device_get_match_data()
        pwm: atmel: Consolidate driver data initialization
        pwm: atmel: Remove unneeded check for match data
        pwm: atmel: Remove platform_device_id and use only dt bindings
        pwm: stm32-lp: Add check in case requested period cannot be achieved
        pwm: Ensure pwm_apply_state() doesn't modify the state argument
        pwm: fsl-ftm: Don't update the state for the caller of pwm_apply_state()
        pwm: sun4i: Don't update the state for the caller of pwm_apply_state()
        pwm: rockchip: Don't update the state for the caller of pwm_apply_state()
        pwm: Let pwm_get_state() return the last implemented state
        pwm: Introduce local struct pwm_chip in pwm_apply_state()
        ...
      e37e3bc7
    • Linus Torvalds's avatar
      Merge tag 'for-5.4/io_uring-2019-09-27' of git://git.kernel.dk/linux-block · 738f531d
      Linus Torvalds authored
      Pull more io_uring updates from Jens Axboe:
       "Just two things in here:
      
         - Improvement to the io_uring CQ ring wakeup for batched IO (me)
      
         - Fix wrong comparison in poll handling (yangerkun)
      
        I realize the first one is a little late in the game, but it felt
        pointless to hold it off until the next release. Went through various
        testing and reviews with Pavel and peterz"
      
      * tag 'for-5.4/io_uring-2019-09-27' of git://git.kernel.dk/linux-block:
        io_uring: make CQ ring wakeups be more efficient
        io_uring: compare cached_cq_tail with cq.head in_io_uring_poll
      738f531d
    • Linus Torvalds's avatar
      Merge tag 'for-linus-2019-09-27' of git://git.kernel.dk/linux-block · 47db9b9a
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A few fixes/changes to round off this merge window. This contains:
      
         - Small series making some functional tweaks to blk-iocost (Tejun)
      
         - Elevator switch locking fix (Ming)
      
         - Kill redundant call in blk-wbt (Yufen)
      
         - Fix flush timeout handling (Yufen)"
      
      * tag 'for-linus-2019-09-27' of git://git.kernel.dk/linux-block:
        block: fix null pointer dereference in blk_mq_rq_timed_out()
        rq-qos: get rid of redundant wbt_update_limits()
        iocost: bump up default latency targets for hard disks
        iocost: improve nr_lagging handling
        iocost: better trace vrate changes
        block: don't release queue's sysfs lock during switching elevator
        blk-mq: move lockdep_assert_held() into elevator_exit
      47db9b9a
    • Linus Torvalds's avatar
      Merge branch 'for-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux · d0e00bc5
      Linus Torvalds authored
      Pull thermal management updates from Zhang Rui:
      
       - Add Amit Kucheria as thermal subsystem Reviewer (Amit Kucheria)
      
       - Fix a use after free bug when unregistering thermal zone devices (Ido
         Schimmel)
      
       - Fix thermal core framework to use put_device() when device_register()
         fails (Yue Hu)
      
       - Enable intel_pch_thermal and MMIO RAPL support for Intel Icelake
         platform (Srinivas Pandruvada)
      
       - Add clock operations in qorip thermal driver, for some platforms with
         clock control like i.MX8MQ (Anson Huang)
      
       - A couple of trivial fixes and cleanups for thermal core and different
         soc thermal drivers (Amit Kucheria, Christophe JAILLET, Chuhong Yuan,
         Fuqian Huang, Kelsey Skunberg, Nathan Huckleberry, Rishi Gupta,
         Srinivas Kandagatla)
      
      * 'for-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
        MAINTAINERS: Add Amit Kucheria as reviewer for thermal
        thermal: Add some error messages
        thermal: Fix use-after-free when unregistering thermal zone device
        thermal/drivers/core: Use put_device() if device_register() fails
        thermal_hwmon: Sanitize thermal_zone type
        thermal: intel: Use dev_get_drvdata
        thermal: intel: int3403: replace printk(KERN_WARN...) with pr_warn(...)
        thermal: intel: int340x_thermal: Remove unnecessary acpi_has_method() uses
        thermal: int340x: processor_thermal: Add Ice Lake support
        drivers: thermal: qcom: tsens: Fix memory leak from qfprom read
        thermal: tegra: Fix a typo
        thermal: rcar_gen3_thermal: Replace devm_add_action() followed by failure action with devm_add_action_or_reset()
        thermal: armada: Fix -Wshift-negative-value
        dt-bindings: thermal: qoriq: Add optional clocks property
        thermal: qoriq: Use __maybe_unused instead of #if CONFIG_PM_SLEEP
        thermal: qoriq: Use devm_platform_ioremap_resource() instead of of_iomap()
        thermal: qoriq: Fix error path of calling qoriq_tmu_register_tmu_zone fail
        thermal: qoriq: Add clock operations
        drivers: thermal: processor_thermal_device: Export sysfs interface for TCC offset
      d0e00bc5
    • Linus Torvalds's avatar
      Merge tag 'linux-watchdog-5.4-rc1' of git://www.linux-watchdog.org/linux-watchdog · 7bccb9f1
      Linus Torvalds authored
      Pull watchdog updates from Wim Van Sebroeck:
      
       - addition of AST2600, i.MX7ULP and F81803 watchdog support
      
       - removal of the w90x900 and ks8695 drivers
      
       - ziirave_wdt improvements
      
       - small fixes and improvements
      
      * tag 'linux-watchdog-5.4-rc1' of git://www.linux-watchdog.org/linux-watchdog: (51 commits)
        watchdog: f71808e_wdt: Add F81803 support
        watchdog: qcom: remove unnecessary variable from private storage
        watchdog: qcom: support pre-timeout when the bark irq is available
        watchdog: imx_sc: this patch just fixes whitespaces
        watchdog: apseed: Add access_cs0 option for alt-boot
        watchdog: aspeed: add support for dual boot
        watchdog: orion_wdt: use timer1 as a pretimeout
        watchdog: Add i.MX7ULP watchdog support
        dt-bindings: watchdog: Add i.MX7ULP bindings
        dt-bindings: watchdog: sun4i: Add the watchdog clock
        dt-bindings: watchdog: sun4i: Add the watchdog interrupts
        dt-bindings: watchdog: Convert Allwinner watchdog to a schema
        dt-bindings: watchdog: Add YAML schemas for the generic watchdog bindings
        watchdog: aspeed: Add support for AST2600
        dt-bindings: watchdog: Add ast2600 compatible
        watchdog: ziirave_wdt: Update checked I2C functionality mask
        watchdog: ziirave_wdt: Drop ziirave_firm_write_block_data()
        watchdog: ziirave_wdt: Fix DOWNLOAD_START payload
        watchdog: ziirave_wdt: Drop status polling code
        watchdog: ziirave_wdt: Fix RESET_PROCESSOR payload
        ...
      7bccb9f1
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2019-09-27' of git://anongit.freedesktop.org/drm/drm · 289991ce
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Fixes built up over the past 1.5 weeks or so, it's two weeks of
        amdgpu, some core cleanups and some panfrost fixes. I also finally
        figured out why my desktop was slow to do a bunch of stuff (someone
        gave it an IPv6 address which can't reach anything!).
      
        core:
         - Some cleanups and fixes in the self-refresh helpers
         - Some cleanups and fixes in the atomic helpers
      
        amdgpu:
         - Fix a 64 bit divide
         - Prevent a memory leak in a failure case in dc
         - Load proper gfx firmware on navi14 variants
         - Add more navi12 and navi14 PCI ids
         - Misc fixes for renoir
         - Fix bandwidth issues with multiple displays on vega20
         - Support for Dali
         - Fix a possible oops with KFD on hawaii
         - Fix for backlight level after resume on some APUs
         - Other misc fixes
      
        panfrost:
         - Multiple panfrost fixes for regulator support and page fault
           handling"
      
      * tag 'drm-next-2019-09-27' of git://anongit.freedesktop.org/drm/drm: (34 commits)
        drm/amd/display: prevent memory leak
        drm/amdgpu/gfx10: add support for wks firmware loading
        drm/amdgpu/display: include slab.h in dcn21_resource.c
        drm/amdgpu/display: fix 64 bit divide
        drm/panfrost: Prevent race when handling page fault
        drm/panfrost: Remove NULL checks for regulator
        drm/panfrost: Fix regulator_get_optional() misuse
        drm: Measure Self Refresh Entry/Exit times to avoid thrashing
        drm: Fix kerneldoc and remove unused struct member in self_refresh helper
        drm/atomic: Rename crtc_state->pageflip_flags to async_flip
        drm/atomic: Reject FLIP_ASYNC unconditionally
        drm/atomic: Take the atomic toys away from X
        drm/amdgpu: flag navi12 and 14 as experimental for 5.4
        drm/kms: Duct-tape for mode object lifetime checks
        drm/amdgpu: add navi12 pci id
        drm/amdgpu: add navi14 PCI ID for work station SKU
        drm/amdkfd: Swap trap temporary registers in gfx10 trap handler
        drm/amd/powerplay: implement sysfs for getting dpm clock
        drm/amd/display: Restore backlight brightness after system resume
        drm/amd/display: Implement voltage limitation for dali
        ...
      289991ce
    • Linus Torvalds's avatar
      Merge tag 'ntb-5.4' of git://github.com/jonmason/ntb · 0cd81d77
      Linus Torvalds authored
      Pull NTB updates from Jon Mason:
       "A few bugfixes and support for new AMD NTB hardware"
      
      * tag 'ntb-5.4' of git://github.com/jonmason/ntb:
        NTB: fix IDT Kconfig typos/spellos
        ntb_hw_amd: Add memory window support for new AMD hardware
        ntb_hw_amd: Add a new NTB PCI device ID
        NTB: ntb_transport: remove redundant assignment to rc
        ntb_hw_switchtec: make ntb_mw_set_trans() work when addr == 0
        ntb: point to right memory window index
      0cd81d77
    • Jarkko Sakkinen's avatar
      keys: Add Jarkko Sakkinen as co-maintainer · ea1e2bbe
      Jarkko Sakkinen authored
      To address a major procedural concern on Linus's part the keyrings needs
      a co-maintainer.
      Suggested-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ea1e2bbe
    • Yufen Yu's avatar
      block: fix null pointer dereference in blk_mq_rq_timed_out() · 8d699663
      Yufen Yu authored
      We got a null pointer deference BUG_ON in blk_mq_rq_timed_out()
      as following:
      
      [  108.825472] BUG: kernel NULL pointer dereference, address: 0000000000000040
      [  108.827059] PGD 0 P4D 0
      [  108.827313] Oops: 0000 [#1] SMP PTI
      [  108.827657] CPU: 6 PID: 198 Comm: kworker/6:1H Not tainted 5.3.0-rc8+ #431
      [  108.829503] Workqueue: kblockd blk_mq_timeout_work
      [  108.829913] RIP: 0010:blk_mq_check_expired+0x258/0x330
      [  108.838191] Call Trace:
      [  108.838406]  bt_iter+0x74/0x80
      [  108.838665]  blk_mq_queue_tag_busy_iter+0x204/0x450
      [  108.839074]  ? __switch_to_asm+0x34/0x70
      [  108.839405]  ? blk_mq_stop_hw_queue+0x40/0x40
      [  108.839823]  ? blk_mq_stop_hw_queue+0x40/0x40
      [  108.840273]  ? syscall_return_via_sysret+0xf/0x7f
      [  108.840732]  blk_mq_timeout_work+0x74/0x200
      [  108.841151]  process_one_work+0x297/0x680
      [  108.841550]  worker_thread+0x29c/0x6f0
      [  108.841926]  ? rescuer_thread+0x580/0x580
      [  108.842344]  kthread+0x16a/0x1a0
      [  108.842666]  ? kthread_flush_work+0x170/0x170
      [  108.843100]  ret_from_fork+0x35/0x40
      
      The bug is caused by the race between timeout handle and completion for
      flush request.
      
      When timeout handle function blk_mq_rq_timed_out() try to read
      'req->q->mq_ops', the 'req' have completed and reinitiated by next
      flush request, which would call blk_rq_init() to clear 'req' as 0.
      
      After commit 12f5b931 ("blk-mq: Remove generation seqeunce"),
      normal requests lifetime are protected by refcount. Until 'rq->ref'
      drop to zero, the request can really be free. Thus, these requests
      cannot been reused before timeout handle finish.
      
      However, flush request has defined .end_io and rq->end_io() is still
      called even if 'rq->ref' doesn't drop to zero. After that, the 'flush_rq'
      can be reused by the next flush request handle, resulting in null
      pointer deference BUG ON.
      
      We fix this problem by covering flush request with 'rq->ref'.
      If the refcount is not zero, flush_end_io() return and wait the
      last holder recall it. To record the request status, we add a new
      entry 'rq_status', which will be used in flush_end_io().
      
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Keith Busch <keith.busch@intel.com>
      Cc: Bart Van Assche <bvanassche@acm.org>
      Cc: stable@vger.kernel.org # v4.18+
      Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
      Reviewed-by: default avatarBob Liu <bob.liu@oracle.com>
      Signed-off-by: default avatarYufen Yu <yuyufen@huawei.com>
      
      -------
      v2:
       - move rq_status from struct request to struct blk_flush_queue
      v3:
       - remove unnecessary '{}' pair.
      v4:
       - let spinlock to protect 'fq->rq_status'
      v5:
       - move rq_status after flush_running_idx member of struct blk_flush_queue
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      8d699663
    • Yufen Yu's avatar
      rq-qos: get rid of redundant wbt_update_limits() · 2af2783f
      Yufen Yu authored
      We have updated limits after calling wbt_set_min_lat(). No need to
      update again.
      Reviewed-by: default avatarBob Liu <bob.liu@oracle.com>
      Signed-off-by: default avatarYufen Yu <yuyufen@huawei.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      2af2783f
  2. 26 Sep, 2019 26 commits