1. 27 Sep, 2019 9 commits
    • 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 31 commits