1. 17 Jul, 2020 8 commits
    • Linus Torvalds's avatar
      Merge tag 'ovl-fixes-5.8-rc6' of... · 44fea373
      Linus Torvalds authored
      Merge tag 'ovl-fixes-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs into master
      
      Pull overlayfs fixes from Miklos Szeredi:
      
       - fix a regression introduced in v4.20 in handling a regenerated
         squashfs lower layer
      
       - two regression fixes for this cycle, one of which is Oops inducing
      
       - miscellaneous issues
      
      * tag 'ovl-fixes-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
        ovl: fix lookup of indexed hardlinks with metacopy
        ovl: fix unneeded call to ovl_change_flags()
        ovl: fix mount option checks for nfs_export with no upperdir
        ovl: force read-only sb on failure to create index dir
        ovl: fix regression with re-formatted lower squashfs
        ovl: fix oops in ovl_indexdir_cleanup() with nfs_export=on
        ovl: relax WARN_ON() when decoding lower directory file handle
        ovl: remove not used argument in ovl_check_origin
        ovl: change ovl_copy_up_flags static
        ovl: inode reference leak in ovl_is_inuse true case.
      44fea373
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v5.8-rc5' of... · 33b9108f
      Linus Torvalds authored
      Merge tag 'spi-fix-v5.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into master
      
      Pull spi fixes from Mark Brown:
       "A couple of small driver specific fixes for fairly minor issues"
      
      * tag 'spi-fix-v5.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: spi-sun6i: sun6i_spi_transfer_one(): fix setting of clock rate
        spi: mediatek: use correct SPI_CFG2_REG MACRO
      33b9108f
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v5.8-rc5' of... · 8da822e8
      Linus Torvalds authored
      Merge tag 'regulator-fix-v5.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into master
      
      Pull regulator fixes from Mark Brown:
       "The more substantial fix here is the rename of the da903x driver which
        fixes a collision with the parent MFD driver name which caused issues
        when things were built as modules.
      
        There's also a fix for a mislableled regulator on the pmi8994 which is
        quite important for systems with that device"
      
      * tag 'regulator-fix-v5.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        MAINTAINERS: remove obsolete entry after file renaming
        regulator: rename da903x to da903x-regulator
        regulator: qcom_smd: Fix pmi8994 label
      8da822e8
    • Linus Torvalds's avatar
      Merge tag 'regmap-fix-v5.8-rc5' of... · ee436955
      Linus Torvalds authored
      Merge tag 'regmap-fix-v5.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into master
      
      Pull regmap fixes from Mark Brown:
       "A couple of substantial fixes here, one from Doug which fixes the
        debugfs code for MMIO regmaps (fortunately not the common case) and
        one from Marc fixing lookups of multiple regmaps for the same device
        (a very unusual case).
      
        There's also a fix for Kconfig to ensure we enable SoundWire properly"
      
      * tag 'regmap-fix-v5.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: debugfs: Don't sleep while atomic for fast_io regmaps
        regmap: add missing dependency on SoundWire
        regmap: dev_get_regmap_match(): fix string comparison
      ee436955
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid into master · 60541fb6
      Linus Torvalds authored
      Pull HID fixes from Jiri Kosina:
      
       - linked list race condition fix in hid-steam driver from Rodrigo Rivas
         Costa
      
       - assorted deviceID-specific quirks and other small cosmetic cleanups
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
        HID: logitech-hidpp: avoid repeated "multiplier = " log messages
        HID: logitech: Use HIDPP_RECEIVER_INDEX instead of 0xff
        HID: quirks: Ignore Simply Automated UPB PIM
        HID: apple: Disable Fn-key key-re-mapping on clone keyboards
        MAINTAINERS: update uhid and hid-wiimote entry
        HID: steam: fixes race in handling device list.
        HID: magicmouse: do not set up autorepeat
        HID: alps: support devices with report id 2
        HID: quirks: Always poll Obins Anne Pro 2 keyboard
        HID: i2c-hid: add Mediacom FlexBook edge13 to descriptor override
      60541fb6
    • Linus Torvalds's avatar
      Merge tag 'sound-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into master · a238ac2d
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "No surprise here, just a few device-specific small fixes: two fixes
        for USB LINE6 and one for USB-audio drivers wrt syzkaller fuzzer
        issues, while the rest are all HD-audio Realtek quirks"
      
      * tag 'sound-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda/realtek - fixup for yet another Intel reference board
        ALSA: hda/realtek - Enable Speaker for ASUS UX563
        ALSA: hda/realtek - Enable Speaker for ASUS UX533 and UX534
        ALSA: hda/realtek: Enable headset mic of Acer TravelMate B311R-31 with ALC256
        ALSA: hda/realtek: enable headset mic of ASUS ROG Zephyrus G14(G401) series with ALC289
        ALSA: hda/realtek - change to suitable link model for ASUS platform
        ALSA: usb-audio: Fix race against the error recovery URB submission
        ALSA: line6: Sync the pending work cancel at disconnection
        ALSA: line6: Perform sanity check for each URB creation
      a238ac2d
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2020-07-17-1' of git://anongit.freedesktop.org/drm/drm into master · 88825726
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Weekly fixes pull, big bigger than I'd normally like, but they are
        fairly scattered and small individually.
      
        The vmwgfx one is a black screen regression, otherwise the largest is
        an MST encoder fix for amdgpu which results in a WARN in some cases,
        and a scattering of i915 fixes.
      
        I'm tracking two regressions at the moment that hopefully we get
        nailed down this week for rc7.
      
        dma-buf:
         - sleeping atomic fix
      
        amdgpu:
         - Fix a race condition with KIQ
         - Preemption fix
         - Fix handling of fake MST encoders
         - OLED panel fix
         - Handle allocation failure in stream construction
         - Renoir SMC fix
         - SDMA 5.x fix
      
        i915:
         - FBC w/a stride fix
         - Fix use-after-free fix on module reload
         - Ignore irq enabling on the virtual engines to fix device sleep
         - Use GTT when saving/restoring engine GPR
         - Fix selftest sort function
      
        vmwgfx:
         - black screen fix
      
        aspeed:
         - fbcon init warn fix"
      
      * tag 'drm-fixes-2020-07-17-1' of git://anongit.freedesktop.org/drm/drm:
        drm/amdgpu/sdma5: fix wptr overwritten in ->get_wptr()
        drm/amdgpu/powerplay: Modify SMC message name for setting power profile mode
        drm/amd/display: handle failed allocation during stream construction
        drm/amd/display: OLED panel backlight adjust not work with external display connected
        drm/amdgpu/display: create fake mst encoders ahead of time (v4)
        drm/amdgpu: fix preemption unit test
        drm/amdgpu/gfx10: fix race condition for kiq
        drm/i915: Recalculate FBC w/a stride when needed
        drm/i915: Move cec_notifier to intel_hdmi_connector_unregister, v2.
        drm/i915/gt: Only swap to a random sibling once upon creation
        drm/i915/gt: Ignore irq enabling on the virtual engines
        drm/i915/perf: Use GTT when saving/restoring engine GPR
        drm/i915/selftests: Fix compare functions provided for sorting
        drm/vmwgfx: fix update of display surface when resolution changes
        dmabuf: use spinlock to access dmabuf->name
        drm/aspeed: Call drm_fbdev_generic_setup after drm_dev_register
      88825726
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-5.8-2020-07-15' of... · adbe8a3c
      Dave Airlie authored
      Merge tag 'amd-drm-fixes-5.8-2020-07-15' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
      
      amd-drm-fixes-5.8-2020-07-15:
      
      amdgpu:
      - Fix a race condition with KIQ
      - Preemption fix
      - Fix handling of fake MST encoders
      - OLED panel fix
      - Handle allocation failure in stream construction
      - Renoir SMC fix
      - SDMA 5.x fix
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexdeucher@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200715213914.3994-1-alexander.deucher@amd.com
      adbe8a3c
  2. 16 Jul, 2020 19 commits
  3. 15 Jul, 2020 13 commits
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v5.8-2' of... · 994e99a9
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v5.8-2' of git://git.infradead.org/linux-platform-drivers-x86 into master
      
      Pull x86 platform driver fixes from Andriy Shevchenko:
       "Small fixes for this cycle:
      
         - Fix procfs handling in Thinkpad ACPI driver
      
         - Fix battery management on new ASUS laptops
      
         - New IDs (Sapphire Rapids) in ISST tool"
      
      * tag 'platform-drivers-x86-v5.8-2' of git://git.infradead.org/linux-platform-drivers-x86:
        platform/x86: asus-wmi: allow BAT1 battery name
        platform/x86: ISST: Add new PCI device ids
        platform/x86: thinkpad_acpi: Revert "Use strndup_user() in dispatch_proc_write()"
      994e99a9
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix-5.8-rc6' of... · 0665a4e9
      Linus Torvalds authored
      Merge tag 'dmaengine-fix-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine into master
      
      Pull dmaengine fixes from Vinod Koul:
      
       - update dmaengine tree location to kernel.org
      
       - dmatest fix for completing threads
      
       - driver fixes for k3dma, fsl-dma, idxd, ,tegra, and few other drivers
      
      * tag 'dmaengine-fix-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (21 commits)
        dmaengine: ioat setting ioat timeout as module parameter
        dmaengine: fsl-edma: fix wrong tcd endianness for big-endian cpu
        dmaengine: dmatest: stop completed threads when running without set channel
        dmaengine: fsl-edma-common: correct DSIZE_32BYTE
        dmaengine: dw: Initialize channel before each transfer
        dmaengine: idxd: fix misc interrupt handler thread unmasking
        dmaengine: idxd: cleanup workqueue config after disabling
        dmaengine: tegra210-adma: Fix runtime PM imbalance on error
        dmaengine: mcf-edma: Fix NULL pointer exception in mcf_edma_tx_handler
        dmaengine: fsl-edma: Fix NULL pointer exception in fsl_edma_tx_handler
        dmaengine: fsl-edma: Add lockdep assert for exported function
        dmaengine: idxd: fix hw descriptor fields for delta record
        dmaengine: ti: k3-udma: add missing put_device() call in of_xudma_dev_get()
        dmaengine: sh: usb-dmac: set tx_result parameters
        dmaengine: ti: k3-udma: Fix delayed_work usage for tx drain workaround
        dmaengine: idxd: fix cdev locking for open and release
        dmaengine: imx-sdma: Fix: Remove 'always true' comparison
        MAINTAINERS: switch dmaengine tree to kernel.org
        dmaengine: ti: k3-udma: Fix the running channel handling in alloc_chan_resources
        dmaengine: ti: k3-udma: Fix cleanup code for alloc_chan_resources
        ...
      0665a4e9
    • Wei Yongjun's avatar
      keys: asymmetric: fix error return code in software_key_query() · 6cbba1f9
      Wei Yongjun authored
      Fix to return negative error code -ENOMEM from kmalloc() error handling
      case instead of 0, as done elsewhere in this function.
      
      Fixes: f1774cb8 ("X.509: parse public key parameters from x509 for akcipher")
      Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6cbba1f9
    • David Howells's avatar
      afs: Fix interruption of operations · 811f04ba
      David Howells authored
      The afs filesystem driver allows unstarted operations to be cancelled by
      signal, but most of these can easily be restarted (mkdir for example).  The
      primary culprits for reproducing this are those applications that use
      SIGALRM to display a progress counter.
      
      File lock-extension operation is marked uninterruptible as we have a
      limited time in which to do it, and the release op is marked
      uninterruptible also as if we fail to unlock a file, we'll have to wait 20
      mins before anyone can lock it again.
      
      The store operation logs a warning if it gets interruption, e.g.:
      
      	kAFS: Unexpected error from FS.StoreData -4
      
      because it's run from the background - but it can also be run from
      fdatasync()-type things.  However, store options aren't marked
      interruptible at the moment.
      
      Fix this in the following ways:
      
       (1) Mark store operations as uninterruptible.  It might make sense to
           relax this for certain situations, but I'm not sure how to make sure
           that background store ops aren't affected by signals to foreground
           processes that happen to trigger them.
      
       (2) In afs_get_io_locks(), where we're getting the serialisation lock for
           talking to the fileserver, return ERESTARTSYS rather than EINTR
           because a lot of the operations (e.g. mkdir) are restartable if we
           haven't yet started sending the op to the server.
      
      Fixes: e49c7b2f ("afs: Build an abstraction around an "operation" concept")
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      811f04ba
    • Amir Goldstein's avatar
      ovl: fix mount option checks for nfs_export with no upperdir · f0e1266e
      Amir Goldstein authored
      Without upperdir mount option, there is no index dir and the dependency
      checks nfs_export => index for mount options parsing are incorrect.
      
      Allow the combination nfs_export=on,index=off with no upperdir and move
      the check for dependency redirect_dir=nofollow for non-upper mount case
      to mount options parsing.
      Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      f0e1266e
    • Amir Goldstein's avatar
      ovl: force read-only sb on failure to create index dir · 470c1563
      Amir Goldstein authored
      With index feature enabled, on failure to create index dir, overlay is
      being mounted read-only.  However, we do not forbid user to remount overlay
      read-write.  Fix that by setting ofs->workdir to NULL, which prevents
      remount read-write.
      Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      470c1563
    • Amir Goldstein's avatar
      ovl: fix regression with re-formatted lower squashfs · a888db31
      Amir Goldstein authored
      Commit 9df085f3 ("ovl: relax requirement for non null uuid of lower
      fs") relaxed the requirement for non null uuid with single lower layer to
      allow enabling index and nfs_export features with single lower squashfs.
      
      Fabian reported a regression in a setup when overlay re-uses an existing
      upper layer and re-formats the lower squashfs image.  Because squashfs
      has no uuid, the origin xattr in upper layer are decoded from the new
      lower layer where they may resolve to a wrong origin file and user may
      get an ESTALE or EIO error on lookup.
      
      To avoid the reported regression while still allowing the new features
      with single lower squashfs, do not allow decoding origin with lower null
      uuid unless user opted-in to one of the new features that require
      following the lower inode of non-dir upper (index, xino, metacopy).
      Reported-by: default avatarFabian <godi.beat@gmx.net>
      Link: https://lore.kernel.org/linux-unionfs/32532923.JtPX5UtSzP@fgdesktop/
      Fixes: 9df085f3 ("ovl: relax requirement for non null uuid of lower fs")
      Cc: stable@vger.kernel.org # v4.20+
      Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      a888db31
    • Amir Goldstein's avatar
      ovl: fix oops in ovl_indexdir_cleanup() with nfs_export=on · 20396365
      Amir Goldstein authored
      Mounting with nfs_export=on, xfstests overlay/031 triggers a kernel panic
      since v5.8-rc1 overlayfs updates.
      
       overlayfs: orphan index entry (index/00fb1..., ftype=4000, nlink=2)
       BUG: kernel NULL pointer dereference, address: 0000000000000030
       RIP: 0010:ovl_cleanup_and_whiteout+0x28/0x220 [overlay]
      
      Bisect point at commit c21c839b ("ovl: whiteout inode sharing")
      
      Minimal reproducer:
      --------------------------------------------------
      rm -rf l u w m
      mkdir -p l u w m
      mkdir -p l/testdir
      touch l/testdir/testfile
      mount -t overlay -o lowerdir=l,upperdir=u,workdir=w,nfs_export=on overlay m
      echo 1 > m/testdir/testfile
      umount m
      rm -rf u/testdir
      mount -t overlay -o lowerdir=l,upperdir=u,workdir=w,nfs_export=on overlay m
      umount m
      --------------------------------------------------
      
      When mount with nfs_export=on, and fail to verify an orphan index, we're
      cleaning this index from indexdir by calling ovl_cleanup_and_whiteout().
      This dereferences ofs->workdir, that was earlier set to NULL.
      
      The design was that ovl->workdir will point at ovl->indexdir, but we are
      assigning ofs->indexdir to ofs->workdir only after ovl_indexdir_cleanup().
      There is no reason not to do it sooner, because once we get success from
      ofs->indexdir = ovl_workdir_create(... there is no turning back.
      Reported-and-tested-by: default avatarMurphy Zhou <jencce.kernel@gmail.com>
      Fixes: c21c839b ("ovl: whiteout inode sharing")
      Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      20396365
    • Amir Goldstein's avatar
      ovl: relax WARN_ON() when decoding lower directory file handle · 124c2de2
      Amir Goldstein authored
      Decoding a lower directory file handle to overlay path with cold
      inode/dentry cache may go as follows:
      
      1. Decode real lower file handle to lower dir path
      2. Check if lower dir is indexed (was copied up)
      3. If indexed, get the upper dir path from index
      4. Lookup upper dir path in overlay
      5. If overlay path found, verify that overlay lower is the lower dir
         from step 1
      
      On failure to verify step 5 above, user will get an ESTALE error and a
      WARN_ON will be printed.
      
      A mismatch in step 5 could be a result of lower directory that was renamed
      while overlay was offline, after that lower directory has been copied up
      and indexed.
      
      This is a scripted reproducer based on xfstest overlay/052:
      
        # Create lower subdir
        create_dirs
        create_test_files $lower/lowertestdir/subdir
        mount_dirs
        # Copy up lower dir and encode lower subdir file handle
        touch $SCRATCH_MNT/lowertestdir
        test_file_handles $SCRATCH_MNT/lowertestdir/subdir -p -o $tmp.fhandle
        # Rename lower dir offline
        unmount_dirs
        mv $lower/lowertestdir $lower/lowertestdir.new/
        mount_dirs
        # Attempt to decode lower subdir file handle
        test_file_handles $SCRATCH_MNT -p -i $tmp.fhandle
      
      Since this WARN_ON() can be triggered by user we need to relax it.
      
      Fixes: 4b91c30a ("ovl: lookup connected ancestor of dir in inode cache")
      Cc: <stable@vger.kernel.org> # v4.16+
      Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      124c2de2
    • youngjun's avatar
      ovl: remove not used argument in ovl_check_origin · d78a0dcf
      youngjun authored
      ovl_check_origin outparam 'ctrp' argument not used by caller.  So remove
      this argument.
      Signed-off-by: default avataryoungjun <her0gyugyu@gmail.com>
      Reviewed-by: default avatarAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      d78a0dcf
    • youngjun's avatar
      ovl: change ovl_copy_up_flags static · 5ac8e802
      youngjun authored
      "ovl_copy_up_flags" is used in copy_up.c.
      so, change it static.
      Signed-off-by: default avataryoungjun <her0gyugyu@gmail.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      5ac8e802
    • youngjun's avatar
      ovl: inode reference leak in ovl_is_inuse true case. · 24f14009
      youngjun authored
      When "ovl_is_inuse" true case, trap inode reference not put.  plus adding
      the comment explaining sequence of ovl_is_inuse after ovl_setup_trap.
      
      Fixes: 0be0bfd2 ("ovl: fix regression caused by overlapping layers detection")
      Cc: <stable@vger.kernel.org> # v4.19+
      Reviewed-by: default avatarAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: default avataryoungjun <her0gyugyu@gmail.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      24f14009
    • Vasiliy Kupriakov's avatar
      platform/x86: asus-wmi: allow BAT1 battery name · 9a33e375
      Vasiliy Kupriakov authored
      The battery on my laptop ASUS TUF Gaming FX706II is named BAT1.
      This patch allows battery extension to load.
      Signed-off-by: default avatarVasiliy Kupriakov <rublag-ns@yandex.ru>
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      9a33e375