1. 04 May, 2024 2 commits
    • Steven Rostedt (Google)'s avatar
      eventfs: Free all of the eventfs_inode after RCU · ee4e0379
      Steven Rostedt (Google) authored
      The freeing of eventfs_inode via a kfree_rcu() callback. But the content
      of the eventfs_inode was being freed after the last kref. This is
      dangerous, as changes are being made that can access the content of an
      eventfs_inode from an RCU loop.
      
      Instead of using kfree_rcu() use call_rcu() that calls a function to do
      all the freeing of the eventfs_inode after a RCU grace period has expired.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240502200905.370261163@goodmis.org
      
      Cc: stable@vger.kernel.org
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Fixes: 43aa6f97 ("eventfs: Get rid of dentry pointers without refcounts")
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      ee4e0379
    • Steven Rostedt (Google)'s avatar
      eventfs/tracing: Add callback for release of an eventfs_inode · b63db58e
      Steven Rostedt (Google) authored
      Synthetic events create and destroy tracefs files when they are created
      and removed. The tracing subsystem has its own file descriptor
      representing the state of the events attached to the tracefs files.
      There's a race between the eventfs files and this file descriptor of the
      tracing system where the following can cause an issue:
      
      With two scripts 'A' and 'B' doing:
      
        Script 'A':
          echo "hello int aaa" > /sys/kernel/tracing/synthetic_events
          while :
          do
            echo 0 > /sys/kernel/tracing/events/synthetic/hello/enable
          done
      
        Script 'B':
          echo > /sys/kernel/tracing/synthetic_events
      
      Script 'A' creates a synthetic event "hello" and then just writes zero
      into its enable file.
      
      Script 'B' removes all synthetic events (including the newly created
      "hello" event).
      
      What happens is that the opening of the "enable" file has:
      
       {
      	struct trace_event_file *file = inode->i_private;
      	int ret;
      
      	ret = tracing_check_open_get_tr(file->tr);
       [..]
      
      But deleting the events frees the "file" descriptor, and a "use after
      free" happens with the dereference at "file->tr".
      
      The file descriptor does have a reference counter, but there needs to be a
      way to decrement it from the eventfs when the eventfs_inode is removed
      that represents this file descriptor.
      
      Add an optional "release" callback to the eventfs_entry array structure,
      that gets called when the eventfs file is about to be removed. This allows
      for the creating on the eventfs file to increment the tracing file
      descriptor ref counter. When the eventfs file is deleted, it can call the
      release function that will call the put function for the tracing file
      descriptor.
      
      This will protect the tracing file from being freed while a eventfs file
      that references it is being opened.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20240426073410.17154-1-Tze-nan.Wu@mediatek.com/
      Link: https://lore.kernel.org/linux-trace-kernel/20240502090315.448cba46@gandalf.local.home
      
      Cc: stable@vger.kernel.org
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Fixes: 5790b1fb ("eventfs: Remove eventfs_file and just use eventfs_inode")
      Reported-by: default avatarTze-nan wu <Tze-nan.Wu@mediatek.com>
      Tested-by: default avatarTze-nan Wu (吳澤南) <Tze-nan.Wu@mediatek.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      b63db58e
  2. 28 Apr, 2024 6 commits
  3. 27 Apr, 2024 9 commits
    • Linus Torvalds's avatar
      Merge tag 'rust-fixes-6.9' of https://github.com/Rust-for-Linux/linux · 2c815938
      Linus Torvalds authored
      Pull Rust fixes from Miguel Ojeda:
      
       - Soundness: make internal functions generated by the 'module!' macro
         inaccessible, do not implement 'Zeroable' for 'Infallible' and
         require 'Send' for the 'Module' trait.
      
       - Build: avoid errors with "empty" files and workaround 'rustdoc' ICE.
      
       - Kconfig: depend on '!CFI_CLANG' and avoid selecting 'CONSTRUCTORS'.
      
       - Code docs: remove non-existing key from 'module!' macro example.
      
       - Docs: trivial rendering fix in arch table.
      
      * tag 'rust-fixes-6.9' of https://github.com/Rust-for-Linux/linux:
        rust: remove `params` from `module` macro example
        kbuild: rust: force `alloc` extern to allow "empty" Rust files
        kbuild: rust: remove unneeded `@rustc_cfg` to avoid ICE
        rust: kernel: require `Send` for `Module` implementations
        rust: phy: implement `Send` for `Registration`
        rust: make mutually exclusive with CFI_CLANG
        rust: macros: fix soundness issue in `module!` macro
        rust: init: remove impl Zeroable for Infallible
        docs: rust: fix improper rendering in Arch Support page
        rust: don't select CONSTRUCTORS
      2c815938
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 57865f39
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
      
       - A fix for TASK_SIZE on rv64/NOMMU, to reflect the lack of user/kernel
         separation
      
       - A fix to avoid loading rv64/NOMMU kernel past the start of RAM
      
       - A fix for RISCV_HWPROBE_EXT_ZVFHMIN on ilp32 to avoid signed integer
         overflow in the bitmask
      
       - The sud_test kselftest has been fixed to properly swizzle the syscall
         number into the return register, which are not the same on RISC-V
      
       - A fix for a build warning in the perf tools on rv32
      
       - A fix for the CBO selftests, to avoid non-constants leaking into the
         inline asm
      
       - A pair of fixes for T-Head PBMT errata probing, which has been
         renamed MAE by the vendor
      
      * tag 'riscv-for-linus-6.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        RISC-V: selftests: cbo: Ensure asm operands match constraints, take 2
        perf riscv: Fix the warning due to the incompatible type
        riscv: T-Head: Test availability bit before enabling MAE errata
        riscv: thead: Rename T-Head PBMT to MAE
        selftests: sud_test: return correct emulated syscall value on RISC-V
        riscv: hwprobe: fix invalid sign extension for RISCV_HWPROBE_EXT_ZVFHMIN
        riscv: Fix loading 64-bit NOMMU kernels past the start of RAM
        riscv: Fix TASK_SIZE on 64-bit NOMMU
      57865f39
    • Linus Torvalds's avatar
      Merge tag '6.9-rc5-cifs-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 · d43df69f
      Linus Torvalds authored
      Pull smb client fixes from Steve French:
       "Three smb3 client fixes, all also for stable:
      
         - two small locking fixes spotted by Coverity
      
         - FILE_ALL_INFO and network_open_info packing fix"
      
      * tag '6.9-rc5-cifs-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
        smb3: fix lock ordering potential deadlock in cifs_sync_mid_result
        smb3: missing lock when picking channel
        smb: client: Fix struct_group() usage in __packed structs
      d43df69f
    • Linus Torvalds's avatar
      Merge tag 'i2c-for-6.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 5d12ed4b
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Fix a race condition in the at24 eeprom handler, a NULL pointer
        exception in the I2C core for controllers only using target modes,
        drop a MAINTAINERS entry, and fix an incorrect DT binding for at24"
      
      * tag 'i2c-for-6.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: smbus: fix NULL function pointer dereference
        MAINTAINERS: Drop entry for PCA9541 bus master selector
        eeprom: at24: fix memory corruption race condition
        dt-bindings: eeprom: at24: Fix ST M24C64-D compatible schema
      5d12ed4b
    • Tetsuo Handa's avatar
      profiling: Remove create_prof_cpu_mask(). · 2e5449f4
      Tetsuo Handa authored
      create_prof_cpu_mask() is no longer used after commit 1f44a225 ("s390:
      convert interrupt handling to use generic hardirq").
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2e5449f4
    • Linus Torvalds's avatar
      Merge tag 'soundwire-6.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire · 8a5c3ef7
      Linus Torvalds authored
      Pull soundwire fix from Vinod Koul:
      
       - Single AMD driver fix for wake interrupt handling in clockstop mode
      
      * tag 'soundwire-6.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
        soundwire: amd: fix for wake interrupt handling for clockstop mode
      8a5c3ef7
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine · 6fba14a7
      Linus Torvalds authored
      Pull dmaengine fixes from Vinod Koul:
      
       - Revert pl330 issue_pending waits until WFP state due to regression
         reported in Bluetooth loading
      
       - Xilinx driver fixes for synchronization, buffer offsets, locking and
         kdoc
      
       - idxd fixes for spinlock and preventing the migration of the perf
         context to an invalid target
      
       - idma driver fix for interrupt handling when powered off
      
       - Tegra driver residual calculation fix
      
       - Owl driver register access fix
      
      * tag 'dmaengine-fix-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine:
        dmaengine: idxd: Fix oops during rmmod on single-CPU platforms
        dmaengine: xilinx: xdma: Clarify kdoc in XDMA driver
        dmaengine: xilinx: xdma: Fix synchronization issue
        dmaengine: xilinx: xdma: Fix wrong offsets in the buffers addresses in dma descriptor
        dma: xilinx_dpdma: Fix locking
        dmaengine: idxd: Convert spinlock to mutex to lock evl workqueue
        idma64: Don't try to serve interrupts when device is powered off
        dmaengine: tegra186: Fix residual calculation
        dmaengine: owl: fix register access functions
        dmaengine: Revert "dmaengine: pl330: issue_pending waits until WFP state"
      6fba14a7
    • Linus Torvalds's avatar
      Merge tag 'phy-fixes-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy · 63407d30
      Linus Torvalds authored
      Pull phy fixes from Vinod Koul:
      
       - static checker (array size, bounds) fix for marvel driver
      
       - Rockchip rk3588 pcie fixes for bifurcation and mux
      
       - Qualcomm qmp-compbo fix for VCO, register base and regulator name for
         m31 driver
      
       - charger det crash fix for ti driver
      
      * tag 'phy-fixes-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy:
        phy: ti: tusb1210: Resolve charger-det crash if charger psy is unregistered
        phy: qcom: qmp-combo: fix VCO div offset on v5_5nm and v6
        phy: phy-rockchip-samsung-hdptx: Select CONFIG_RATIONAL
        phy: qcom: m31: match requested regulator name with dt schema
        phy: qcom: qmp-combo: Fix register base for QSERDES_DP_PHY_MODE
        phy: qcom: qmp-combo: Fix VCO div offset on v3
        phy: rockchip: naneng-combphy: Fix mux on rk3588
        phy: rockchip-snps-pcie3: fix clearing PHP_GRF_PCIESEL_CON bits
        phy: rockchip-snps-pcie3: fix bifurcation on rk3588
        phy: freescale: imx8m-pcie: fix pcie link-up instability
        phy: marvell: a3700-comphy: Fix hardcoded array size
        phy: marvell: a3700-comphy: Fix out of bounds read
      63407d30
    • Wolfram Sang's avatar
      i2c: smbus: fix NULL function pointer dereference · 91811a31
      Wolfram Sang authored
      Baruch reported an OOPS when using the designware controller as target
      only. Target-only modes break the assumption of one transfer function
      always being available. Fix this by always checking the pointer in
      __i2c_transfer.
      Reported-by: default avatarBaruch Siach <baruch@tkos.co.il>
      Closes: https://lore.kernel.org/r/4269631780e5ba789cf1ae391eec1b959def7d99.1712761976.git.baruch@tkos.co.il
      Fixes: 4b1acc43 ("i2c: core changes for slave support")
      [wsa: dropped the simplification in core-smbus to avoid theoretical regressions]
      Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
      Tested-by: default avatarBaruch Siach <baruch@tkos.co.il>
      91811a31
  4. 26 Apr, 2024 23 commits
    • Linus Torvalds's avatar
      Merge tag 'soc-fixes-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 5eb4573e
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "There are a lot of minor DT fixes for Mediatek, Rockchip, Qualcomm and
        Microchip and NXP, addressing both build-time warnings and bugs found
        during runtime testing.
      
        Most of these changes are machine specific fixups, but there are a few
        notable regressions that affect an entire SoC:
      
         - The Qualcomm MSI support that was improved for 6.9 ended up being
           wrong on some chips and now gets fixed.
      
         - The i.MX8MP camera interface broke due to a typo and gets updated
           again.
      
        The main driver fix is also for Qualcomm platforms, rewriting an
        interface in the QSEECOM firmware support that could lead to crashing
        the kernel from a trusted application.
      
        The only other code changes are minor fixes for Mediatek SoC drivers"
      
      * tag 'soc-fixes-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (50 commits)
        ARM: dts: imx6ull-tarragon: fix USB over-current polarity
        soc: mediatek: mtk-socinfo: depends on CONFIG_SOC_BUS
        soc: mediatek: mtk-svs: Append "-thermal" to thermal zone names
        arm64: dts: imx8mp: Fix assigned-clocks for second CSI2
        ARM: dts: microchip: at91-sama7g54_curiosity: Replace regulator-suspend-voltage with the valid property
        ARM: dts: microchip: at91-sama7g5ek: Replace regulator-suspend-voltage with the valid property
        arm64: dts: rockchip: Fix USB interface compatible string on kobol-helios64
        arm64: dts: qcom: sc8180x: Fix ss_phy_irq for secondary USB controller
        arm64: dts: qcom: sm8650: Fix the msi-map entries
        arm64: dts: qcom: sm8550: Fix the msi-map entries
        arm64: dts: qcom: sm8450: Fix the msi-map entries
        arm64: dts: qcom: sc8280xp: add missing PCIe minimum OPP
        arm64: dts: qcom: x1e80100: Fix the compatible for cluster idle states
        arm64: dts: qcom: Fix type of "wdog" IRQs for remoteprocs
        arm64: dts: rockchip: regulator for sd needs to be always on for BPI-R2Pro
        dt-bindings: rockchip: grf: Add missing type to 'pcie-phy' node
        arm64: dts: rockchip: drop redundant disable-gpios in Lubancat 2
        arm64: dts: rockchip: drop redundant disable-gpios in Lubancat 1
        arm64: dts: rockchip: drop redundant pcie-reset-suspend in Scarlet Dumo
        arm64: dts: rockchip: mark system power controller and fix typo on orangepi-5-plus
        ...
      5eb4573e
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2024-04-26-13-30' of... · e6ebf011
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2024-04-26-13-30' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull misc fixes from Andrew Morton:
       "11 hotfixes. 8 are cc:stable and the remaining 3 (nice ratio!) address
        post-6.8 issues or aren't considered suitable for backporting.
      
        All except one of these are for MM. I see no particular theme - it's
        singletons all over"
      
      * tag 'mm-hotfixes-stable-2024-04-26-13-30' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        mm/hugetlb: fix DEBUG_LOCKS_WARN_ON(1) when dissolve_free_hugetlb_folio()
        selftests: mm: protection_keys: save/restore nr_hugepages value from launch script
        stackdepot: respect __GFP_NOLOCKDEP allocation flag
        hugetlb: check for anon_vma prior to folio allocation
        mm: zswap: fix shrinker NULL crash with cgroup_disable=memory
        mm: turn folio_test_hugetlb into a PageType
        mm: support page_mapcount() on page_has_type() pages
        mm: create FOLIO_FLAG_FALSE and FOLIO_TYPE_OPS macros
        mm/hugetlb: fix missing hugetlb_lock for resv uncharge
        selftests: mm: fix unused and uninitialized variable warning
        selftests/harness: remove use of LINE_MAX
      e6ebf011
    • Linus Torvalds's avatar
      Merge tag 'mmc-v6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 4630932a
      Linus Torvalds authored
      Pull MMC host fixes from Ulf Hansson:
      
       - moxart: Fix regression for sg_miter for PIO mode
      
       - sdhci-msm: Avoid hang by preventing access to suspended controller
      
       - sdhci-of-dwcmshc: Fix SD card tuning error for th1520
      
      * tag 'mmc-v6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: moxart: fix handling of sgm->consumed, otherwise WARN_ON triggers
        mmc: sdhci-of-dwcmshc: th1520: Increase tuning loop count to 128
        mmc: sdhci-msm: pervent access to suspended controller
      4630932a
    • Linus Torvalds's avatar
      Merge tag 'arc-6.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · c9e35b4a
      Linus Torvalds authored
      Pull ARC fixes from Vineet Gupta:
      
       - Incorrect VIPT aliasing assumption
      
       - Misc build warning fixes and some typos
      
      * tag 'arc-6.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARC: [plat-hsdk]: Remove misplaced interrupt-cells property
        ARC: Fix typos
        ARC: mm: fix new code about cache aliasing
        ARC: Fix -Wmissing-prototypes warnings
      c9e35b4a
    • Linus Torvalds's avatar
      Merge tag 'mtd/fixes-for-6.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux · bbacf717
      Linus Torvalds authored
      Pull MTD fixes from Miquel Raynal:
       "There has been OTP support improvements in the NVMEM subsystem, and
        later also improvements of OTP support in the NAND subsystem. This
        lead to situations that we currently cannot handle, so better prevent
        this situation from happening in order to avoid canceling device's
        probe.
      
        In the raw NAND subsystem, two runtime fixes have been shared, one
        fixing two important commands in the Qcom driver since it got reworked
        and a NULL pointer dereference happening on STB chips.
      
        Arnd also fixed a UBSAN link failure on diskonchip"
      
      * tag 'mtd/fixes-for-6.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
        mtd: limit OTP NVMEM cell parse to non-NAND devices
        mtd: diskonchip: work around ubsan link failure
        mtd: rawnand: qcom: Fix broken OP_RESET_DEVICE command in qcom_misc_cmd_type_exec()
        mtd: rawnand: brcmnand: Fix data access violation for STB chip
      bbacf717
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v6.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 3022bf37
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
      
       - fix a regression in pin access control in gpio-tegra186
      
       - make data pointer dereference robust in Intel Tangier driver
      
      * tag 'gpio-fixes-for-v6.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpio: tegra186: Fix tegra186_gpio_is_accessible() check
        gpio: tangier: Use correct type for the IRQ chip data
      3022bf37
    • Linus Torvalds's avatar
      Merge tag 'cxl-fixes-6.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl · 5b43efa1
      Linus Torvalds authored
      Pull cxl fix from Dave Jiang:
      
       - Fix potential payload size confusion in cxl_mem_get_poison()
      
      * tag 'cxl-fixes-6.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
        cxl/core: Fix potential payload size confusion in cxl_mem_get_poison()
      5b43efa1
    • Linus Torvalds's avatar
      Merge tag 'for-6.9/dm-fixes-3' of... · 08f0677d
      Linus Torvalds authored
      Merge tag 'for-6.9/dm-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fixes from Mike Snitzer:
      
       - Fix 6.9 regression so that DM device removal is performed
         synchronously by default.
      
         Asynchronous removal has always been possible but it isn't the
         default. It is important that synchronous removal be preserved,
         otherwise it is an interface change that breaks lvm2.
      
       - Remove errant semicolon in drivers/md/dm-vdo/murmurhash3.c
      
      * tag 'for-6.9/dm-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm: restore synchronous close of device mapper block device
        dm vdo murmurhash: remove unneeded semicolon
      08f0677d
    • Linus Torvalds's avatar
      Merge tag 'vfs-6.9-rc6.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs · 52034cae
      Linus Torvalds authored
      Pull vfs fixes from Christian Brauner:
       "This contains a few small fixes for this merge window and the attempt
        to handle the ntfs removal regression that was reported a little while
        ago:
      
         - After the removal of the legacy ntfs driver we received reports
           about regressions for some people that do mount "ntfs" explicitly
           and expect the driver to be available. Since ntfs3 is a drop-in for
           legacy ntfs we alias legacy ntfs to ntfs3 just like ext3 is aliased
           to ext4.
      
           We also enforce legacy ntfs is always mounted read-only and give it
           custom file operations to ensure that ioctl()'s can't be abused to
           perform write operations.
      
         - Fix an unbalanced module_get() in bdev_open().
      
         - Two smaller fixes for the netfs work done earlier in this cycle.
      
         - Fix the errno returned from the new FS_IOC_GETUUID and
           FS_IOC_GETFSSYSFSPATH ioctls. Both commands just pull information
           out of the superblock so there's no need to call into the actual
           ioctl handlers.
      
           So instead of returning ENOIOCTLCMD to indicate to fallback we just
           return ENOTTY directly avoiding that indirection"
      
      * tag 'vfs-6.9-rc6.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
        netfs: Fix the pre-flush when appending to a file in writethrough mode
        netfs: Fix writethrough-mode error handling
        ntfs3: add legacy ntfs file operations
        ntfs3: enforce read-only when used as legacy ntfs driver
        ntfs3: serve as alias for the legacy ntfs driver
        block: fix module reference leakage from bdev_open_by_dev error path
        fs: Return ENOTTY directly if FS_IOC_GETUUID or FS_IOC_GETFSSYSFSPATH fail
      52034cae
    • Linus Torvalds's avatar
      Merge tag 'loongarch-fixes-6.9-2' of... · 09ef2957
      Linus Torvalds authored
      Merge tag 'loongarch-fixes-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
      
      Pull LoongArch fixes from Huacai Chen:
       "Fix some build errors and some trivial runtime bugs"
      
      * tag 'loongarch-fixes-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
        LoongArch: Lately init pmu after smp is online
        LoongArch: Fix callchain parse error with kernel tracepoint events
        LoongArch: Fix access error when read fault on a write-only VMA
        LoongArch: Fix a build error due to __tlb_remove_tlb_entry()
        LoongArch: Fix Kconfig item and left code related to CRASH_CORE
      09ef2957
    • Linus Torvalds's avatar
      Merge tag 'pwm/for-6.9-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux · 084c473c
      Linus Torvalds authored
      Pull maintainer entry update from Uwe Kleine-König:
       "This is just an update to my maintainer entries as I will switch jobs
        soon. Getting a contact email address into the MAINTAINERS file that
        will work also after my switch will hopefully reduce people mailing to
        the then non-existing address.
      
        I also drop my co-maintenance for SIOX, but that continues to be in
        good hands"
      
      * tag 'pwm/for-6.9-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux:
        MAINTAINERS: Update Uwe's email address, drop SIOX maintenance
      084c473c
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2024-04-26' of https://gitlab.freedesktop.org/drm/kernel · 61ef6208
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Regular weekly merge request, mostly amdgpu and misc bits in
        xe/etnaviv/gma500 and some core changes. Nothing too outlandish, seems
        to be about normal for this time of release.
      
        atomic-helpers:
         - Fix memory leak in drm_format_conv_state_copy()
      
        fbdev:
         - fbdefio: Fix address calculation
      
        amdgpu:
         - Suspend/resume fix
         - Don't expose gpu_od directory if it's empty
         - SDMA 4.4.2 fix
         - VPE fix
         - BO eviction fix
         - UMSCH fix
         - SMU 13.0.6 reset fixes
         - GPUVM flush accounting fix
         - SDMA 5.2 fix
         - Fix possible UAF in mes code
      
        amdkfd:
         - Eviction fence handling fix
         - Fix memory leak when GPU memory allocation fails
         - Fix dma-buf validation
         - Fix rescheduling of restore worker
         - SVM fix
      
        gma500:
         - Fix crash during boot
      
        etnaviv:
         - fix GC7000 TX clock gating
         - revert NPU UAPI changes
      
        xe:
         - Fix error paths on managed allocations
         - Fix PF/VF relay messages"
      
      * tag 'drm-fixes-2024-04-26' of https://gitlab.freedesktop.org/drm/kernel: (23 commits)
        Revert "drm/etnaviv: Expose a few more chipspecs to userspace"
        drm/etnaviv: fix tx clock gating on some GC7000 variants
        drm/xe/guc: Fix arguments passed to relay G2H handlers
        drm/xe: call free_gsc_pkt only once on action add failure
        drm/xe: Remove sysfs only once on action add failure
        fbdev: fix incorrect address computation in deferred IO
        drm/amdgpu/mes: fix use-after-free issue
        drm/amdgpu/sdma5.2: use legacy HDP flush for SDMA2/3
        drm/amdgpu: Fix the ring buffer size for queue VM flush
        drm/amdkfd: Add VRAM accounting for SVM migration
        drm/amd/pm: Restore config space after reset
        drm/amdgpu/umsch: don't execute umsch test when GPU is in reset/suspend
        drm/amdkfd: Fix rescheduling of restore worker
        drm/amdgpu: Update BO eviction priorities
        drm/amdgpu/vpe: fix vpe dpm setup failed
        drm/amdgpu: Assign correct bits for SDMA HDP flush
        drm/amdgpu/pm: Remove gpu_od if it's an empty directory
        drm/amdkfd: make sure VM is ready for updating operations
        drm/amdgpu: Fix leak when GPU memory allocation fails
        drm/amdkfd: Fix eviction fence handling
        ...
      61ef6208
    • Arnd Bergmann's avatar
      Merge tag 'mtk-soc-fixes-for-v6.9' of... · 9f26bc71
      Arnd Bergmann authored
      Merge tag 'mtk-soc-fixes-for-v6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into for-next
      
      MediaTek driver fixes for v6.9
      
      This fixes the MediaTek SVS driver to look for the right thermal zone
      names, and adds a missing Kconfig dependency for mtk-socinfo.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      9f26bc71
    • Palmer Dabbelt's avatar
      Merge patch series "RISC-V: Test th.sxstatus.MAEE bit before enabling MAEE" · 6beb6bc5
      Palmer Dabbelt authored
      Christoph Müllner <christoph.muellner@vrull.eu> says:
      
      Currently, the Linux kernel suffers from a boot regression when running
      on the c906 QEMU emulation. Details have been reported here by Björn Töpel:
        https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg04766.html
      
      The main issue is, that Linux enables XTheadMae for CPUs that have a T-Head
      mvendorid but QEMU maintainers don't want to emulate a CPU that uses
      reserved bits in PTEs. See also the following discussion for more
      context:
        https://lists.gnu.org/archive/html/qemu-devel/2024-02/msg00775.html
      
      This series renames "T-Head PBMT" to "MAE"/"XTheadMae" and only enables
      it if the th.sxstatus.MAEE bit is set.
      
      The th.sxstatus CSR is documented here:
        https://github.com/T-head-Semi/thead-extension-spec/blob/master/xtheadsxstatus.adoc
      
      XTheadMae is documented here:
        https://github.com/T-head-Semi/thead-extension-spec/blob/master/xtheadmae.adoc
      
      The QEMU patch to emulate th.sxstatus with the MAEE bit not set is here:
        https://lore.kernel.org/all/20240329120427.684677-1-christoph.muellner@vrull.eu/
      
      After applying the referenced QEMU patch, this patchset allows to
      successfully boot a C906 QEMU system emulation ("-cpu thead-c906").
      
      * b4-shazam-lts:
        riscv: T-Head: Test availability bit before enabling MAE errata
        riscv: thead: Rename T-Head PBMT to MAE
      
      Link: https://lore.kernel.org/r/20240407213236.2121592-1-christoph.muellner@vrull.euSigned-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      6beb6bc5
    • Andrew Jones's avatar
      RISC-V: selftests: cbo: Ensure asm operands match constraints, take 2 · 49408400
      Andrew Jones authored
      Commit 0de65288 ("RISC-V: selftests: cbo: Ensure asm operands
      match constraints") attempted to ensure MK_CBO() would always
      provide to a compile-time constant when given a constant, but
      cpu_to_le32() isn't necessarily going to do that. Switch to manually
      shifting the bytes, when needed, to finally get this right.
      Reported-by: default avatarWoodrow Shen <woodrow.shen@sifive.com>
      Closes: https://lore.kernel.org/all/CABquHATcBTUwfLpd9sPObBgNobqQKEAZ2yxk+TWSpyO5xvpXpg@mail.gmail.com/
      Fixes: a29e2a48 ("RISC-V: selftests: Add CBO tests")
      Fixes: 0de65288 ("RISC-V: selftests: cbo: Ensure asm operands match constraints")
      Signed-off-by: default avatarAndrew Jones <ajones@ventanamicro.com>
      Link: https://lore.kernel.org/r/20240322134728.151255-2-ajones@ventanamicro.comSigned-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      49408400
    • Ben Zong-You Xie's avatar
      perf riscv: Fix the warning due to the incompatible type · 9c49085d
      Ben Zong-You Xie authored
      In the 32-bit platform, the second argument of getline is expectd to be
      'size_t *'(aka 'unsigned int *'), but line_sz is of type
      'unsigned long *'. Therefore, declare line_sz as size_t.
      Signed-off-by: default avatarBen Zong-You Xie <ben717@andestech.com>
      Reviewed-by: default avatarAlexandre Ghiti <alexghiti@rivosinc.com>
      Link: https://lore.kernel.org/r/20240305120501.1785084-3-ben717@andestech.comSigned-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      9c49085d
    • Arnd Bergmann's avatar
      Merge tag 'qcom-drivers-fixes-for-6.9' of... · 14672a9b
      Arnd Bergmann authored
      Merge tag 'qcom-drivers-fixes-for-6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into for-next
      
      Qualcomm driver fix for v6.9
      
      This reworks the memory layout of the argument buffers passed to trusted
      applications in QSEECOM, to avoid failures and system crashes.
      
      * tag 'qcom-drivers-fixes-for-6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
        firmware: qcom: uefisecapp: Fix memory related IO errors and crashes
      
      Link: https://lore.kernel.org/r/20240420163816.1133528-1-andersson@kernel.orgSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      14672a9b
    • Arnd Bergmann's avatar
      Merge tag 'imx-fixes-6.9-2' of... · 7e685383
      Arnd Bergmann authored
      Merge tag 'imx-fixes-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into for-next
      
      i.MX fixes for 6.9, round 2:
      
      - Fix i.MX8MP the second CSI2 assigned-clock property which got wrong by
        commit f78835d1 ("arm64: dts: imx8mp: reparent MEDIA_MIPI_PHY1_REF
        to CLK_24M")
      - Correct USB over-current polarity for imx6ull-tarragon board
      
      * tag 'imx-fixes-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
        ARM: dts: imx6ull-tarragon: fix USB over-current polarity
        arm64: dts: imx8mp: Fix assigned-clocks for second CSI2
      
      Link: https://lore.kernel.org/r/ZioopqscxwUOwQkf@dragonSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      7e685383
    • Arnd Bergmann's avatar
      Merge tag 'mtk-dts64-fixes-for-v6.9' of... · 9e0794ae
      Arnd Bergmann authored
      Merge tag 'mtk-dts64-fixes-for-v6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into for-next
      
      MediaTek ARM64 DTS fixes for v6.9
      
      This fixes some dts validation issues against bindings for multiple SoCs,
      GPU voltage constraints for Chromebook devices, missing gce-client-reg
      on various nodes (performance issues) on MT8183/92/95, and also fixes
      boot issues on MT8195 when SPMI is built as module.
      
      * tag 'mtk-dts64-fixes-for-v6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux:
        arm64: dts: mediatek: mt2712: fix validation errors
        arm64: dts: mediatek: mt7986: prefix BPI-R3 cooling maps with "map-"
        arm64: dts: mediatek: mt7986: drop invalid thermal block clock
        arm64: dts: mediatek: mt7986: drop "#reset-cells" from Ethernet controller
        arm64: dts: mediatek: mt7986: drop invalid properties from ethsys
        arm64: dts: mediatek: mt7622: drop "reset-names" from thermal block
        arm64: dts: mediatek: mt7622: fix ethernet controller "compatible"
        arm64: dts: mediatek: mt7622: fix IR nodename
        arm64: dts: mediatek: mt7622: fix clock controllers
        arm64: dts: mediatek: mt8186-corsola: Update min voltage constraint for Vgpu
        arm64: dts: mediatek: mt8183-kukui: Use default min voltage for MT6358
        arm64: dts: mediatek: mt8195-cherry: Update min voltage constraint for MT6315
        arm64: dts: mediatek: mt8192-asurada: Update min voltage constraint for MT6315
        arm64: dts: mediatek: cherry: Describe CPU supplies
        arm64: dts: mediatek: mt8195: Add missing gce-client-reg to mutex1
        arm64: dts: mediatek: mt8195: Add missing gce-client-reg to mutex
        arm64: dts: mediatek: mt8195: Add missing gce-client-reg to vpp/vdosys
        arm64: dts: mediatek: mt8192: Add missing gce-client-reg to mutex
        arm64: dts: mediatek: mt8183: Add power-domains properity to mfgcfg
      9e0794ae
    • Arnd Bergmann's avatar
      Merge tag 'at91-fixes-6.9' of... · fdabd4b2
      Arnd Bergmann authored
      Merge tag 'at91-fixes-6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into for-next
      
      AT91 fixes for 6.9
      
      It contains:
      - fixes for regulator nodes on SAMA7G5 based boards: proper DT property is used
        to setup regulators suspend voltage.
      
      * tag 'at91-fixes-6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
        ARM: dts: microchip: at91-sama7g54_curiosity: Replace regulator-suspend-voltage with the valid property
        ARM: dts: microchip: at91-sama7g5ek: Replace regulator-suspend-voltage with the valid property
      
      Link: https://lore.kernel.org/r/20240421124824.960096-1-claudiu.beznea@tuxon.devSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      fdabd4b2
    • Arnd Bergmann's avatar
      Merge tag 'qcom-arm64-fixes-for-6.9' of... · 14e9d449
      Arnd Bergmann authored
      Merge tag 'qcom-arm64-fixes-for-6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into for-next
      
      Qualcomm Arm64 DeviceTree fixes for v6.9
      
      This corrects the watchdog IRQ flags for a number of remoteproc
      instances, which otherwise prevents the driver from probe in the face of
      a probe deferral.
      
      Improvements in other areas, such as USB, have made it possible for CX
      rail voltage on SC8280XP to be lowered, no longer meeting requirements
      of active PCIe controllers. Necessary votes are added to these
      controllers.
      
      The MSI definitions for PCIe controllers in SM8450, SM8550, and SM8650
      was incorrect, due to a bug in the driver. As this has now been fixed
      the definition needs to be corrected.
      
      Lastly, the SuperSpeed PHY irq of the second USB controller in SC8180x,
      and the compatible string for X1 Elite domain idle states are corrected.
      
      * tag 'qcom-arm64-fixes-for-6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
        arm64: dts: qcom: sc8180x: Fix ss_phy_irq for secondary USB controller
        arm64: dts: qcom: sm8650: Fix the msi-map entries
        arm64: dts: qcom: sm8550: Fix the msi-map entries
        arm64: dts: qcom: sm8450: Fix the msi-map entries
        arm64: dts: qcom: sc8280xp: add missing PCIe minimum OPP
        arm64: dts: qcom: x1e80100: Fix the compatible for cluster idle states
        arm64: dts: qcom: Fix type of "wdog" IRQs for remoteprocs
      
      Link: https://lore.kernel.org/r/20240420161002.1132240-1-andersson@kernel.orgSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      14e9d449
    • Arnd Bergmann's avatar
      Merge branch 'v6.9-armsoc/dtsfixes' of... · 32a1eaa9
      Arnd Bergmann authored
      Merge branch 'v6.9-armsoc/dtsfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into for-next
      
      * 'v6.9-armsoc/dtsfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
        arm64: dts: rockchip: Fix USB interface compatible string on kobol-helios64
        arm64: dts: rockchip: regulator for sd needs to be always on for BPI-R2Pro
        dt-bindings: rockchip: grf: Add missing type to 'pcie-phy' node
        arm64: dts: rockchip: drop redundant disable-gpios in Lubancat 2
        arm64: dts: rockchip: drop redundant disable-gpios in Lubancat 1
        arm64: dts: rockchip: drop redundant pcie-reset-suspend in Scarlet Dumo
        arm64: dts: rockchip: mark system power controller and fix typo on orangepi-5-plus
        arm64: dts: rockchip: Designate the system power controller on QuartzPro64
        arm64: dts: rockchip: drop panel port unit address in GRU Scarlet
        arm64: dts: rockchip: Remove unsupported node from the Pinebook Pro dts
        arm64: dts: rockchip: Fix the i2c address of es8316 on Cool Pi CM5
        arm64: dts: rockchip: add regulators for PCIe on RK3399 Puma Haikou
        arm64: dts: rockchip: enable internal pull-up on PCIE_WAKE# for RK3399 Puma
        arm64: dts: rockchip: enable internal pull-up on Q7_USB_ID for RK3399 Puma
        arm64: dts: rockchip: fix alphabetical ordering RK3399 puma
        arm64: dts: rockchip: enable internal pull-up for Q7_THRM# on RK3399 Puma
        arm64: dts: rockchip: set PHY address of MT7531 switch to 0x1f
      
      Link: https://lore.kernel.org/r/3413596.CbtlEUcBR6@philSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      32a1eaa9
    • David Howells's avatar
      netfs: Fix the pre-flush when appending to a file in writethrough mode · c97f59e2
      David Howells authored
      In netfs_perform_write(), when the file is marked NETFS_ICTX_WRITETHROUGH
      or O_*SYNC or RWF_*SYNC was specified, write-through caching is performed
      on a buffered file.  When setting up for write-through, we flush any
      conflicting writes in the region and wait for the write to complete,
      failing if there's a write error to return.
      
      The issue arises if we're writing at or above the EOF position because we
      skip the flush and - more importantly - the wait.  This becomes a problem
      if there's a partial folio at the end of the file that is being written out
      and we want to make a write to it too.  Both the already-running write and
      the write we start both want to clear the writeback mark, but whoever is
      second causes a warning looking something like:
      
          ------------[ cut here ]------------
          R=00000012: folio 11 is not under writeback
          WARNING: CPU: 34 PID: 654 at fs/netfs/write_collect.c:105
          ...
          CPU: 34 PID: 654 Comm: kworker/u386:27 Tainted: G S ...
          ...
          Workqueue: events_unbound netfs_write_collection_worker
          ...
          RIP: 0010:netfs_writeback_lookup_folio
      
      Fix this by making the flush-and-wait unconditional.  It will do nothing if
      there are no folios in the pagecache and will return quickly if there are
      no folios in the region specified.
      
      Further, move the WBC attachment above the flush call as the flush is going
      to attach a WBC and detach it again if it is not present - and since we
      need one anyway we might as well share it.
      
      Fixes: 41d8e767 ("netfs: Implement a write-through caching option")
      Reported-by: default avatarkernel test robot <oliver.sang@intel.com>
      Closes: https://lore.kernel.org/oe-lkp/202404161031.468b84f-oliver.sang@intel.comSigned-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Link: https://lore.kernel.org/r/2150448.1714130115@warthog.procyon.org.ukReviewed-by: default avatarJeffrey Layton <jlayton@kernel.org>
      cc: Eric Van Hensbergen <ericvh@kernel.org>
      cc: Latchesar Ionkov <lucho@ionkov.net>
      cc: Dominique Martinet <asmadeus@codewreck.org>
      cc: Christian Schoenebeck <linux_oss@crudebyte.com>
      cc: Marc Dionne <marc.dionne@auristor.com>
      cc: netfs@lists.linux.dev
      cc: linux-fsdevel@vger.kernel.org
      cc: linux-mm@kvack.org
      cc: v9fs@lists.linux.dev
      cc: linux-afs@lists.infradead.org
      cc: linux-cifs@vger.kernel.org
      Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
      c97f59e2