Skip to content
  1. May 02, 2020
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.7-2020-05-01' of git://git.kernel.dk/linux-block · cf018530
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
      
       - Fix for statx not grabbing the file table, making AT_EMPTY_PATH fail
      
       - Cover a few cases where async poll can handle retry, eliminating the
         need for an async thread
      
       - fallback request busy/free fix (Bijan)
      
       - syzbot reported SQPOLL thread exit fix for non-preempt (Xiaoguang)
      
       - Fix extra put of req for sync_file_range (Pavel)
      
       - Always punt splice async. We'll improve this for 5.8, but wanted to
         eliminate the inode mutex lock from the non-blocking path for 5.7
         (Pavel)
      
      * tag 'io_uring-5.7-2020-05-01' of git://git.kernel.dk/linux-block:
        io_uring: punt splice async because of inode mutex
        io_uring: check non-sync defer_list carefully
        io_uring: fix extra put in sync_file_range()
        io_uring: use cond_resched() in io_ring_ctx_wait_and_kill()
        io_uring: use proper references for fallback_req locking
        io_uring: only force async punt if poll based retry can't handle it
        io_uring: enable poll retry for any file with ->read_iter / ->write_iter
        io_uring: statx must grab the file table for valid fd
      cf018530
    • Linus Torvalds's avatar
      Merge tag 'block-5.7-2020-05-01' of git://git.kernel.dk/linux-block · 052c467c
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A few fixes for this release:
      
         - NVMe pull request from Christoph, with a single fix for a double
           free in the namespace error handling.
      
         - Kill the bd_openers check in blk_drop_partitions(), fixing a
           regression in this merge window (Christoph)"
      
      * tag 'block-5.7-2020-05-01' of git://git.kernel.dk/linux-block:
        block: remove the bd_openers checks in blk_drop_partitions
        nvme: prevent double free in nvme_alloc_ns() error handling
      052c467c
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · ab386c46
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Three driver bugfixes, and two reverts because the original patches
        revealed underlying problems which the Tegra guys are now working on"
      
      * 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: aspeed: Avoid i2c interrupt status clear race condition.
        i2c: amd-mp2-pci: Fix Oops in amd_mp2_pci_init() error handling
        Revert "i2c: tegra: Better handle case where CPU0 is busy for a long time"
        Revert "i2c: tegra: Synchronize DMA before termination"
        i2c: iproc: generate stop event for slave writes
      ab386c46
    • Linus Torvalds's avatar
      Merge tag 'sound-5.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · c5364190
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Just a collection of small fixes around this time:
      
         - One more try for fixing PCM OSS regression
      
         - HD-audio: a new quirk for Lenovo, the improved driver blacklisting,
           a lock fix in the minor error path, and a fix for the possible race
           at monitor notifiaction
      
         - USB-audio: a quirk ID fix, a fix for POD HD500 workaround"
      
      * tag 'sound-5.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: usb-audio: Correct a typo of NuPrime DAC-10 USB ID
        ALSA: opti9xx: shut up gcc-10 range warning
        ALSA: hda/hdmi: fix without unlocked before return
        ALSA: hda/hdmi: fix race in monitor detection during probe
        ALSA: hda/realtek - Two front mics on a Lenovo ThinkCenter
        ALSA: line6: Fix POD HD500 audio playback
        ALSA: pcm: oss: Place the plugin buffer overflow checks correctly (for 5.7)
        ALSA: pcm: oss: Place the plugin buffer overflow checks correctly
        ALSA: hda: Match both PCI ID and SSID for driver blacklist
      c5364190
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2020-05-01' of git://anongit.freedesktop.org/drm/drm · 477bfeb9
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Regular scheduled fixes for graphics. Nothing to extreme bunch of
        amdgpu fixes, i915 and qxl fixes, along with some misc ones.
      
        All seems to be progressing normally.
      
        core:
         - EDID off by one DTD fix
         - DP mst write return code fix
      
        dma-buf:
         - fix SET_NAME ioctl uapi
         - doc fixes
      
        amdgpu:
         - Fix a green screen on resume issue
         - PM fixes for SR-IOV SDMA fix for navi
         - Renoir display fixes
         - Cursor and pageflip stuttering fixes
         - Misc additional display fixes
         - (uapi) Add additional DCC tiling flags for navi1x
      
        i915:
         - Fix selftest refcnt leak (Xiyu)
         - Fix gem vma lock (Chris)
         - Fix gt's i915_request.timeline acquire by checking if cacheline is
           valid (Chris)
         - Fix IRQ postinistall fault masks (Matt)
      
        qxl:
         - use after gree fix
         - fix lost kunmap
         - release leak fix
      
        virtio:
         - context destruction fix"
      
      * tag 'drm-fixes-2020-05-01' of git://anongit.freedesktop.org/drm/drm: (26 commits)
        dma-buf: fix documentation build warnings
        drm/qxl: qxl_release use after free
        drm/qxl: lost qxl_bo_kunmap_atomic_page in qxl_image_init_helper()
        drm/i915: Use proper fault mask in interrupt postinstall too
        drm/amd/display: Use cursor locking to prevent flip delays
        drm/amd/display: Update downspread percent to match spreadsheet for DCN2.1
        drm/amd/display: Defer cursor update around VUPDATE for all ASIC
        drm/amd/display: fix rn soc bb update
        drm/amd/display: check if REFCLK_CNTL register is present
        drm/amdgpu: bump version for invalidate L2 before SDMA IBs
        drm/amdgpu: invalidate L2 before SDMA IBs (v2)
        drm/amdgpu: add tiling flags from Mesa
        drm/amd/powerplay: avoid using pm_en before it is initialized revised
        Revert "drm/amd/powerplay: avoid using pm_en before it is initialized"
        drm/qxl: qxl_release leak in qxl_hw_surface_alloc()
        drm/qxl: qxl_release leak in qxl_draw_dirty_fb()
        drm/virtio: only destroy created contexts
        drm/dp_mst: Fix drm_dp_send_dpcd_write() return code
        drm/i915/gt: Check cacheline is valid before acquiring
        drm/i915/gem: Hold obj->vma.lock over for_each_ggtt_vma()
        ...
      477bfeb9
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · cebcff3a
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Four minor fixes: three in drivers and one in the core.
      
        The core one allows an additional state change that fixes a regression
        introduced by an update to the aacraid driver in the previous merge
        window"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: target/iblock: fix WRITE SAME zeroing
        scsi: qla2xxx: check UNLOADING before posting async work
        scsi: qla2xxx: set UNLOADING before waiting for session deletion
        scsi: core: Allow the state change from SDEV_QUIESCE to SDEV_BLOCK
      cebcff3a
  2. May 01, 2020
    • Pavel Begunkov's avatar
      io_uring: punt splice async because of inode mutex · 2fb3e822
      Pavel Begunkov authored
      
      
      Nonblocking do_splice() still may wait for some time on an inode mutex.
      Let's play safe and always punt it async.
      
      Reported-by: default avatarJens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      2fb3e822
    • Pavel Begunkov's avatar
      io_uring: check non-sync defer_list carefully · 4ee36314
      Pavel Begunkov authored
      
      
      io_req_defer() do double-checked locking. Use proper helpers for that,
      i.e. list_empty_careful().
      
      Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      4ee36314
    • Pavel Begunkov's avatar
      io_uring: fix extra put in sync_file_range() · 7759a0bf
      Pavel Begunkov authored
      
      
      [   40.179474] refcount_t: underflow; use-after-free.
      [   40.179499] WARNING: CPU: 6 PID: 1848 at lib/refcount.c:28 refcount_warn_saturate+0xae/0xf0
      ...
      [   40.179612] RIP: 0010:refcount_warn_saturate+0xae/0xf0
      [   40.179617] Code: 28 44 0a 01 01 e8 d7 01 c2 ff 0f 0b 5d c3 80 3d 15 44 0a 01 00 75 91 48 c7 c7 b8 f5 75 be c6 05 05 44 0a 01 01 e8 b7 01 c2 ff <0f> 0b 5d c3 80 3d f3 43 0a 01 00 0f 85 6d ff ff ff 48 c7 c7 10 f6
      [   40.179619] RSP: 0018:ffffb252423ebe18 EFLAGS: 00010286
      [   40.179623] RAX: 0000000000000000 RBX: ffff98d65e929400 RCX: 0000000000000000
      [   40.179625] RDX: 0000000000000001 RSI: 0000000000000086 RDI: 00000000ffffffff
      [   40.179627] RBP: ffffb252423ebe18 R08: 0000000000000001 R09: 000000000000055d
      [   40.179629] R10: 0000000000000c8c R11: 0000000000000001 R12: 0000000000000000
      [   40.179631] R13: ffff98d68c434400 R14: ffff98d6a9cbaa20 R15: ffff98d6a609ccb8
      [   40.179634] FS:  0000000000000000(0000) GS:ffff98d6af580000(0000) knlGS:0000000000000000
      [   40.179636] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   40.179638] CR2: 00000000033e3194 CR3: 000000006480a003 CR4: 00000000003606e0
      [   40.179641] Call Trace:
      [   40.179652]  io_put_req+0x36/0x40
      [   40.179657]  io_free_work+0x15/0x20
      [   40.179661]  io_worker_handle_work+0x2f5/0x480
      [   40.179667]  io_wqe_worker+0x2a9/0x360
      [   40.179674]  ? _raw_spin_unlock_irqrestore+0x24/0x40
      [   40.179681]  kthread+0x12c/0x170
      [   40.179685]  ? io_worker_handle_work+0x480/0x480
      [   40.179690]  ? kthread_park+0x90/0x90
      [   40.179695]  ret_from_fork+0x35/0x40
      [   40.179702] ---[ end trace 85027405f00110aa ]---
      
      Opcode handler must never put submission ref, but that's what
      io_sync_file_range_finish() do. use io_steal_work() there.
      
      Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      7759a0bf
    • Xiaoguang Wang's avatar
      io_uring: use cond_resched() in io_ring_ctx_wait_and_kill() · 3fd44c86
      Xiaoguang Wang authored
      
      
      While working on to make io_uring sqpoll mode support syscalls that need
      struct files_struct, I got cpu soft lockup in io_ring_ctx_wait_and_kill(),
      
          while (ctx->sqo_thread && !wq_has_sleeper(&ctx->sqo_wait))
              cpu_relax();
      
      above loop never has an chance to exit, it's because preempt isn't enabled
      in the kernel, and the context calling io_ring_ctx_wait_and_kill() and
      io_sq_thread() run in the same cpu, if io_sq_thread calls a cond_resched()
      yield cpu and another context enters above loop, then io_sq_thread() will
      always in runqueue and never exit.
      
      Use cond_resched() can fix this issue.
      
      Reported-by: default avatar <syzbot+66243bb7126c410cefe6@syzkaller.appspotmail.com>
      Signed-off-by: default avatarXiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      3fd44c86
    • Bijan Mottahedeh's avatar
      io_uring: use proper references for fallback_req locking · dd461af6
      Bijan Mottahedeh authored
      
      
      Use ctx->fallback_req address for test_and_set_bit_lock() and
      clear_bit_unlock().
      
      Signed-off-by: default avatarBijan Mottahedeh <bijan.mottahedeh@oracle.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      dd461af6
    • Jens Axboe's avatar
      io_uring: only force async punt if poll based retry can't handle it · 490e8967
      Jens Axboe authored
      
      
      We do blocking retry from our poll handler, if the file supports polled
      notifications. Only mark the request as needing an async worker if we
      can't poll for it.
      
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      490e8967
    • Jens Axboe's avatar
      io_uring: enable poll retry for any file with ->read_iter / ->write_iter · af197f50
      Jens Axboe authored
      
      
      We can have files like eventfd where it's perfectly fine to do poll
      based retry on them, right now io_file_supports_async() doesn't take
      that into account.
      
      Pass in data direction and check the f_op instead of just always needing
      an async worker.
      
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      af197f50
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-5.7-2020-04-29' of... · e3dcd86b
      Dave Airlie authored
      
      Merge tag 'amd-drm-fixes-5.7-2020-04-29' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
      
      amd-drm-fixes-5.7-2020-04-29:
      
      amdgpu:
      - Fix a green screen on resume issue
      - PM fixes for SR-IOV
      - SDMA fix for navi
      - Renoir display fixes
      - Cursor and pageflip stuttering fixes
      - Misc additional display fixes
      
      UAPI:
      - Add additional DCC tiling flags for navi1x
        Used by: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4697
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexdeucher@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200429212008.4306-1-alexander.deucher@amd.com
      e3dcd86b
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2020-04-30' of... · a979bb70
      Dave Airlie authored
      
      Merge tag 'drm-intel-fixes-2020-04-30' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      - Fix selftest refcnt leak (Xiyu)
      - Fix gem vma lock (Chris)
      - Fix gt's i915_request.timeline acquire by checking if cacheline is valid (Chris)
      - Fix IRQ postinistall fault masks (Matt)
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200430140042.GA270140@intel.com
      a979bb70
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2020-04-30' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · c62098c9
      Dave Airlie authored
      
      
      A few resources-related fixes for qxl, some doc build warnings and ioctl
      fixes for dma-buf, an off-by-one fix in edid, and a return code fix in
      DP-MST
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Maxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200430153201.wx6of2b2gsoip7bk@gilmour.lan
      c62098c9
    • Linus Torvalds's avatar
      Merge tag 'for-5.7/dm-fixes-2' of... · c45e8bcc
      Linus Torvalds authored
      Merge tag 'for-5.7/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fixes from Mike Snitzer:
      
       - Document DM integrity allow_discard feature that was added during 5.7
         merge window.
      
       - Fix potential for DM writecache data corruption during DM table
         reloads.
      
       - Fix DM verity's FEC support's hash block number calculation in
         verity_fec_decode().
      
       - Fix bio-based DM multipath crash due to use of stale copy of
         MPATHF_QUEUE_IO flag state in __map_bio().
      
      * tag 'for-5.7/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm multipath: use updated MPATHF_QUEUE_IO on mapping for bio-based mpath
        dm verity fec: fix hash block number in verity_fec_decode
        dm writecache: fix data corruption when reloading the target
        dm integrity: document allow_discard option
      c45e8bcc
    • Linus Torvalds's avatar
      Merge tag 'selinux-pr-20200430' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux · 39e16d93
      Linus Torvalds authored
      Pull SELinux fixes from Paul Moore:
       "Two more SELinux patches to fix problems in the v5.7-rcX releases.
      
        Wei Yongjun's patch fixes a return code in an error path, and my patch
        fixes a problem where we were not correctly applying access controls
        to all of the netlink messages in the netlink_send LSM hook"
      
      * tag 'selinux-pr-20200430' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
        selinux: properly handle multiple messages in selinux_netlink_send()
        selinux: fix error return code in cond_read_list()
      39e16d93
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-kunit-5.7-rc4' of... · 0468915b
      Linus Torvalds authored
      Merge tag 'linux-kselftest-kunit-5.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull Kunit fix from Shuah Khan:
       "A single fix to flush the test summary to the console log without
        delay"
      
      * tag 'linux-kselftest-kunit-5.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        kunit: Add missing newline in summary message
      0468915b
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-5.7-rc4' of... · 75ec0ba2
      Linus Torvalds authored
      Merge tag 'linux-kselftest-5.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest updates from Shuah Khan:
      
       - ftrace test fixes to check for required filter files and kprobe args.
      
       - Kselftest build/cross-build dependency check script to make it easier
         for test ring admins/users to configure build systems correctly for
         build/cross-build kselftests. Currently checks library dependencies.
      
          - Checks if Kselftests can be built/cross-built on a system running
            compile test on a trivial C file with LDLIBS specified for each
            individual test in their Makefiles.
      
          - Prints suggested target list for a system filtering out tests
            failed the build dependency check from the TARGETS in Selftests
            the main Makefile when optional -p is specified.
      
          - Prints pass/fail dependency check for each tests/sub-test.
      
          - Prints pass/fail targets and libraries.
      
          - Default: runs dependency checks on all tests.
      
          - Optional test name can be specified to check dependencies for it.
      
      * tag 'linux-kselftest-5.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests/ftrace: Check the first record for kprobe_args_type.tc
        selftests: add build/cross-build dependency check script
        selftests/ftrace: Check required filter files before running test
      75ec0ba2
    • Paul Moore's avatar
      selinux: properly handle multiple messages in selinux_netlink_send() · fb739741
      Paul Moore authored
      
      
      Fix the SELinux netlink_send hook to properly handle multiple netlink
      messages in a single sk_buff; each message is parsed and subject to
      SELinux access control.  Prior to this patch, SELinux only inspected
      the first message in the sk_buff.
      
      Cc: stable@vger.kernel.org
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Reviewed-by: default avatarStephen Smalley <stephen.smalley.work@gmail.com>
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      fb739741
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · af4a32ad
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
      
       - meson-mx-sdio: Fix support for HW busy detection
      
       - sdhci-msm: Fix support for HW busy detection
      
       - cqhci: Fix polling loop by converting to readx_poll_timeout()
      
       - sdhci-xenon: Fix annoying 1.8V regulator warning
      
       - sdhci-pci: Fix eMMC driver strength for BYT-based controllers
      
      * tag 'mmc-v5.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: sdhci-pci: Fix eMMC driver strength for BYT-based controllers
        mmc: sdhci-xenon: fix annoying 1.8V regulator warning
        mmc: sdhci-msm: Enable host capabilities pertains to R1b response
        mmc: cqhci: Avoid false "cqhci: CQE stuck on" by not open-coding timeout loop
        mmc: meson-mx-sdio: remove the broken ->card_busy() op
        mmc: meson-mx-sdio: Set MMC_CAP_WAIT_WHILE_BUSY
        mmc: core: make mmc_interrupt_hpi() static
      af4a32ad
    • Christoph Hellwig's avatar
      block: remove the bd_openers checks in blk_drop_partitions · 10c70d95
      Christoph Hellwig authored
      When replacing the bd_super check with a bd_openers I followed a logical
      conclusion, which turns out to be utterly wrong.  When a block device has
      bd_super sets it has a mount file system on it (although not every
      mounted file system sets bd_super), but that also implies it doesn't even
      have partitions to start with.
      
      So instead of trying to come up with a logical check for all openers,
      just remove the check entirely.
      
      Fixes: d3ef5536 ("block: fix busy device checking in blk_drop_partitions")
      Fixes: cb6b771b
      
       ("block: fix busy device checking in blk_drop_partitions again")
      Reported-by: default avatarMichal Koutný <mkoutny@suse.com>
      Reported-by: default avatarYang Xu <xuyang2018.jy@cn.fujitsu.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      10c70d95
  3. Apr 30, 2020
    • Jens Axboe's avatar
      Merge branch 'nvme-5.7' of git://git.infradead.org/nvme into block-5.7 · 47ed39e0
      Jens Axboe authored
      Pull NVMe fix from Christoph.
      
      * 'nvme-5.7' of git://git.infradead.org/nvme:
        nvme: prevent double free in nvme_alloc_ns() error handling
      47ed39e0
    • Randy Dunlap's avatar
      dma-buf: fix documentation build warnings · 6f49c251
      Randy Dunlap authored
      
      
      Fix documentation warnings in dma-buf.[hc]:
      
      ../drivers/dma-buf/dma-buf.c:678: warning: Function parameter or member 'importer_ops' not described in 'dma_buf_dynamic_attach'
      ../drivers/dma-buf/dma-buf.c:678: warning: Function parameter or member 'importer_priv' not described in 'dma_buf_dynamic_attach'
      ../include/linux/dma-buf.h:339: warning: Incorrect use of kernel-doc format:          * @move_notify
      
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: linux-media@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: linaro-mm-sig@lists.linaro.org
      Signed-off-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/7bcbe6fe-0b4b-87da-d003-b68a26eb4cf0@infradead.org
      6f49c251
    • ryan_chen's avatar
      i2c: aspeed: Avoid i2c interrupt status clear race condition. · c926c87b
      ryan_chen authored
      In AST2600 there have a slow peripheral bus between CPU and i2c
      controller. Therefore GIC i2c interrupt status clear have delay timing,
      when CPU issue write clear i2c controller interrupt status. To avoid
      this issue, the driver need have read after write clear at i2c ISR.
      
      Fixes: f327c686
      
       ("i2c: aspeed: added driver for Aspeed I2C")
      Signed-off-by: default avatarryan_chen <ryan_chen@aspeedtech.com>
      Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      [wsa: added Fixes tag]
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      c926c87b
    • Dan Carpenter's avatar
      i2c: amd-mp2-pci: Fix Oops in amd_mp2_pci_init() error handling · ac2b0813
      Dan Carpenter authored
      The problem is that we dereference "privdata->pci_dev" when we print
      the error messages in amd_mp2_pci_init():
      
      	dev_err(ndev_dev(privdata), "Failed to enable MP2 PCI device\n");
      		^^^^^^^^^^^^^^^^^
      
      Fixes: 529766e0
      
       ("i2c: Add drivers for the AMD PCIe MP2 I2C controller")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      Cc: stable@kernel.org
      ac2b0813
    • Takashi Iwai's avatar
      ALSA: usb-audio: Correct a typo of NuPrime DAC-10 USB ID · 547d2c9c
      Takashi Iwai authored
      The USB vendor ID of NuPrime DAC-10 is not 16b0 but 16d0.
      
      Fixes: f656891c
      
       ("ALSA: usb-audio: add more quirks for DSD interfaces")
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20200430124755.15940-1-tiwai@suse.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      547d2c9c
    • Arnd Bergmann's avatar
      ALSA: opti9xx: shut up gcc-10 range warning · 5ce00760
      Arnd Bergmann authored
      gcc-10 points out a few instances of suspicious integer arithmetic
      leading to value truncation:
      
      sound/isa/opti9xx/opti92x-ad1848.c: In function 'snd_opti9xx_configure':
      sound/isa/opti9xx/opti92x-ad1848.c:322:43: error: overflow in conversion from 'int' to 'unsigned char' changes value from '(int)snd_opti9xx_read(chip, 3) & -256 | 240' to '240' [-Werror=overflow]
        322 |   (snd_opti9xx_read(chip, reg) & ~(mask)) | ((value) & (mask)))
            |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
      sound/isa/opti9xx/opti92x-ad1848.c:351:3: note: in expansion of macro 'snd_opti9xx_write_mask'
        351 |   snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(3), 0xf0, 0xff);
            |   ^~~~~~~~~~~~~~~~~~~~~~
      sound/isa/opti9xx/miro.c: In function 'snd_miro_configure':
      sound/isa/opti9xx/miro.c:873:40: error: overflow in conversion from 'int' to 'unsigned char' changes value from '(int)snd_miro_read(chip, 3) & -256 | 240' to '240' [-Werror=overflow]
        873 |   (snd_miro_read(chip, reg) & ~(mask)) | ((value) & (mask)))
            |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
      sound/isa/opti9xx/miro.c:1010:3: note: in expansion of macro 'snd_miro_write_mask'
       1010 |   snd_miro_write_mask(chip, OPTi9XX_MC_REG(3), 0xf0, 0xff);
            |   ^~~~~~~~~~~~~~~~~~~
      
      These are all harmless here as only the low 8 bit are passed down
      anyway. Change the macros to inline functions to make the code
      more readable and also avoid the warning.
      
      Strictly speaking those functions also need locking to make the
      read/write pair atomic, but it seems unlikely that anyone would
      still run into that issue.
      
      Fixes: 1841f613
      
       ("[ALSA] Add snd-miro driver")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Link: https://lore.kernel.org/r/20200429190216.85919-1-arnd@arndb.de
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      5ce00760
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 1d2cc5ac
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
       "A handful of fixes.
      
        Specifically:
      
         - fix linker argument to allow linking with lld
      
         - build fix for configurations without a frame pointer
      
         - a handful of build fixes related the SBI 0.1 vs 0.2 split
      
         - remove STRICT_KERNEL_RWX for !MMU, which isn't useful"
      
      * tag 'riscv-for-linus-5.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: select ARCH_HAS_STRICT_KERNEL_RWX only if MMU
        riscv: sbi: Fix undefined reference to sbi_shutdown
        tty: riscv: Using RISCV_SBI_V01 instead of RISCV_SBI
        riscv: sbi: Correct sbi_shutdown() and sbi_clear_ipi() export
        riscv: fix vdso build with lld
        RISC-V: stacktrace: Declare sp_in_global outside ifdef
      1d2cc5ac
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 6c3efdc9
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
       "This fixes a bunch of bugs detected by KASAN in the caam driver"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: caam - fix the address of the last entry of S/G
        crypto: caam - fix use-after-free KASAN issue for RSA algorithms
        crypto: caam - fix use-after-free KASAN issue for HASH algorithms
        crypto: caam - fix use-after-free KASAN issue for AEAD algorithms
        crypto: caam - fix use-after-free KASAN issue for SKCIPHER algorithms
      6c3efdc9
  4. Apr 29, 2020
    • Vasily Averin's avatar
      drm/qxl: qxl_release use after free · 933db733
      Vasily Averin authored
      qxl_release should not be accesses after qxl_push_*_ring_release() calls:
      userspace driver can process submitted command quickly, move qxl_release
      into release_ring, generate interrupt and trigger garbage collector.
      
      It can lead to crashes in qxl driver or trigger memory corruption
      in some kmalloc-192 slab object
      
      Gerd Hoffmann proposes to swap the qxl_release_fence_buffer_objects() +
      qxl_push_{cursor,command}_ring_release() calls to close that race window.
      
      cc: stable@vger.kernel.org
      Fixes: f64122c1
      
       ("drm: add new QXL driver. (v1.4)")
      Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/fa17b338-66ae-f299-68fe-8d32419d9071@virtuozzo.com
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      933db733
    • Vasily Averin's avatar
      drm/qxl: lost qxl_bo_kunmap_atomic_page in qxl_image_init_helper() · 5b5703db
      Vasily Averin authored
      
      
      v2: removed TODO reminder
      
      Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/a4e0ae09-a73c-1c62-04ef-3f990d41bea9@virtuozzo.com
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      5b5703db
    • Wu Bo's avatar
      ALSA: hda/hdmi: fix without unlocked before return · a2f64724
      Wu Bo authored
      Fix the following coccicheck warning:
      sound/pci/hda/patch_hdmi.c:1852:2-8: preceding lock on line 1846
      
      After add sanity check to pass klockwork check,
      The spdif_mutex should be unlock before return true
      in check_non_pcm_per_cvt().
      
      Fixes: 960a581e
      
       ("ALSA: hda: fix some klockwork scan warnings")
      Signed-off-by: default avatarWu Bo <wubo40@huawei.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/1587907042-694161-1-git-send-email-wubo40@huawei.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      a2f64724
    • Gabriel Krisman Bertazi's avatar
      dm multipath: use updated MPATHF_QUEUE_IO on mapping for bio-based mpath · 5686dee3
      Gabriel Krisman Bertazi authored
      
      
      When adding devices that don't have a scsi_dh on a BIO based multipath,
      I was able to consistently hit the warning below and lock-up the system.
      
      The problem is that __map_bio reads the flag before it potentially being
      modified by choose_pgpath, and ends up using the older value.
      
      The WARN_ON below is not trivially linked to the issue. It goes like
      this: The activate_path delayed_work is not initialized for non-scsi_dh
      devices, but we always set MPATHF_QUEUE_IO, asking for initialization.
      That is fine, since MPATHF_QUEUE_IO would be cleared in choose_pgpath.
      Nevertheless, only for BIO-based mpath, we cache the flag before calling
      choose_pgpath, and use the older version when deciding if we should
      initialize the path.  Therefore, we end up trying to initialize the
      paths, and calling the non-initialized activate_path work.
      
      [   82.437100] ------------[ cut here ]------------
      [   82.437659] WARNING: CPU: 3 PID: 602 at kernel/workqueue.c:1624
        __queue_delayed_work+0x71/0x90
      [   82.438436] Modules linked in:
      [   82.438911] CPU: 3 PID: 602 Comm: systemd-udevd Not tainted 5.6.0-rc6+ #339
      [   82.439680] RIP: 0010:__queue_delayed_work+0x71/0x90
      [   82.440287] Code: c1 48 89 4a 50 81 ff 00 02 00 00 75 2a 4c 89 cf e9
      94 d6 07 00 e9 7f e9 ff ff 0f 0b eb c7 0f 0b 48 81 7a 58 40 74 a8 94 74
      a7 <0f> 0b 48 83 7a 48 00 74 a5 0f 0b eb a1 89 fe 4c 89 cf e9 c8 c4 07
      [   82.441719] RSP: 0018:ffffb738803977c0 EFLAGS: 00010007
      [   82.442121] RAX: ffffa086389f9740 RBX: 0000000000000002 RCX: 0000000000000000
      [   82.442718] RDX: ffffa086350dd930 RSI: ffffa0863d76f600 RDI: 0000000000000200
      [   82.443484] RBP: 0000000000000200 R08: 0000000000000000 R09: ffffa086350dd970
      [   82.444128] R10: 0000000000000000 R11: 0000000000000000 R12: ffffa086350dd930
      [   82.444773] R13: ffffa0863d76f600 R14: 0000000000000000 R15: ffffa08636738008
      [   82.445427] FS:  00007f6abfe9dd40(0000) GS:ffffa0863dd80000(0000) knlGS:00000
      [   82.446040] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   82.446478] CR2: 0000557d288db4e8 CR3: 0000000078b36000 CR4: 00000000000006e0
      [   82.447104] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [   82.447561] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [   82.448012] Call Trace:
      [   82.448164]  queue_delayed_work_on+0x6d/0x80
      [   82.448472]  __pg_init_all_paths+0x7b/0xf0
      [   82.448714]  pg_init_all_paths+0x26/0x40
      [   82.448980]  __multipath_map_bio.isra.0+0x84/0x210
      [   82.449267]  __map_bio+0x3c/0x1f0
      [   82.449468]  __split_and_process_non_flush+0x14a/0x1b0
      [   82.449775]  __split_and_process_bio+0xde/0x340
      [   82.450045]  ? dm_get_live_table+0x5/0xb0
      [   82.450278]  dm_process_bio+0x98/0x290
      [   82.450518]  dm_make_request+0x54/0x120
      [   82.450778]  generic_make_request+0xd2/0x3e0
      [   82.451038]  ? submit_bio+0x3c/0x150
      [   82.451278]  submit_bio+0x3c/0x150
      [   82.451492]  mpage_readpages+0x129/0x160
      [   82.451756]  ? bdev_evict_inode+0x1d0/0x1d0
      [   82.452033]  read_pages+0x72/0x170
      [   82.452260]  __do_page_cache_readahead+0x1ba/0x1d0
      [   82.452624]  force_page_cache_readahead+0x96/0x110
      [   82.452903]  generic_file_read_iter+0x84f/0xae0
      [   82.453192]  ? __seccomp_filter+0x7c/0x670
      [   82.453547]  new_sync_read+0x10e/0x190
      [   82.453883]  vfs_read+0x9d/0x150
      [   82.454172]  ksys_read+0x65/0xe0
      [   82.454466]  do_syscall_64+0x4e/0x210
      [   82.454828]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
      [...]
      [   82.462501] ---[ end trace bb39975e9cf45daa ]---
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarGabriel Krisman Bertazi <krisman@collabora.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      5686dee3
    • Matt Roper's avatar
      drm/i915: Use proper fault mask in interrupt postinstall too · 8598eb78
      Matt Roper authored
      The IRQ postinstall handling had open-coded pipe fault mask selection
      that never got updated for gen11.  Switch it to use
      gen8_de_pipe_fault_mask() to ensure we don't miss updates for new
      platforms.
      
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Fixes: d506a65d
      
       ("drm/i915: Catch GTT fault errors for gen11+ planes")
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200424231423.4065231-1-matthew.d.roper@intel.com
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      (cherry picked from commit 869129ee
      
      )
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      8598eb78
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 96c9a780
      Linus Torvalds authored
      Pull vfs fixes from Al Viro:
       "Two old bugs..."
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        propagate_one(): mnt_set_mountpoint() needs mount_lock
        dlmfs_file_write(): fix the bogosity in handling non-zero *ppos
      96c9a780
    • David Howells's avatar
      Fix use after free in get_tree_bdev() · dd7bc815
      David Howells authored
      Commit 6fcf0c72, a fix to get_tree_bdev() put a missing blkdev_put() in
      the wrong place, before a warnf() that displays the bdev under
      consideration rather after it.
      
      This results in a silent lockup in printk("%pg") called via warnf() from
      get_tree_bdev() under some circumstances when there's a race with the
      blockdev being frozen.  This can be caused by xfstests/tests/generic/085 in
      combination with Lukas Czerner's ext4 mount API conversion patchset.  It
      looks like it ought to occur with other users of get_tree_bdev() such as
      XFS, but apparently doesn't.
      
      Fix this by switching the order of the lines.
      
      Fixes: 6fcf0c72
      
       ("vfs: add missing blkdev_put() in get_tree_bdev()")
      Reported-by: default avatarLukas Czerner <lczerner@redhat.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Ian Kent <raven@themaw.net>
      cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      dd7bc815
    • Aric Cyr's avatar
      drm/amd/display: Use cursor locking to prevent flip delays · b2a7b0ce
      Aric Cyr authored
      
      
      [Why]
      Current locking scheme for cursor can result in a flip missing
      its vsync, deferring it for one or more vsyncs.  Result is a
      potential for stuttering when cursor is moved.
      
      [How]
      Use cursor update lock so that flips are not blocked while cursor
      is being programmed.
      
      Signed-off-by: default avatarAric Cyr <aric.cyr@amd.com>
      Reviewed-by: default avatarNicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
      Acked-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      b2a7b0ce
    • Sung Lee's avatar
      drm/amd/display: Update downspread percent to match spreadsheet for DCN2.1 · 668a6741
      Sung Lee authored
      
      
      [WHY]
      The downspread percentage was copied over from a previous version
      of the display_mode_lib spreadsheet. This value has been updated,
      and the previous value is too high to allow for such modes as
      4K120hz. The new value is sufficient for such modes.
      
      [HOW]
      Update the value in dcn21_resource to match the spreadsheet.
      
      Signed-off-by: default avatarSung Lee <sung.lee@amd.com>
      Reviewed-by: default avatarYongqiang Sun <yongqiang.sun@amd.com>
      Acked-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      668a6741