1. 26 Jun, 2024 5 commits
    • Darrick J. Wong's avatar
      xfs: honor init_xattrs in xfs_init_new_inode for !ATTR fs · 673cd885
      Darrick J. Wong authored
      xfs_init_new_inode ignores the init_xattrs parameter for filesystems
      that do not have ATTR enabled.  As a result, the first init_xattrs file
      to be created by the kernel will not have an attr fork created to store
      acls.  Storing that first acl will add ATTR to the superblock flags, so
      subsequent files will be created with attr forks.  The overhead of this
      is so small that chances are that nobody has noticed this behavior.
      
      However, this is disastrous on a filesystem with parent pointers because
      it requires that a new linkable file /must/ have a pre-existing attr
      fork, and the parent pointers code uses init_xattrs to create that fork.
      The preproduction version of mkfs.xfs used to set this, but the V5 sb
      verifier only requires ATTR2, not ATTR.  There is no guard for
      filesystems with (PARENT && !ATTR).
      
      It turns out that I misunderstood the two flags -- ATTR means that we at
      some point created an attr fork to store xattrs in a file; ATTR2
      apparently means only that inodes have dynamic fork offsets or that the
      filesystem was mounted with the "attr2" option.
      
      Fixes: 2442ee15 ("xfs: eager inode attr fork init needs attr feature awareness")
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
      673cd885
    • Darrick J. Wong's avatar
      xfs: fix direction in XFS_IOC_EXCHANGE_RANGE · dc5e1cba
      Darrick J. Wong authored
      The kernel reads userspace's buffer but does not write it back.
      Therefore this is really an _IOW ioctl.  Change this before 6.10 final
      releases.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
      dc5e1cba
    • Darrick J. Wong's avatar
      xfs: allow unlinked symlinks and dirs with zero size · 1ec9307f
      Darrick J. Wong authored
      For a very very long time, inode inactivation has set the inode size to
      zero before unmapping the extents associated with the data fork.
      Unfortunately, commit 3c6f46ea changed the inode verifier to
      prohibit zero-length symlinks and directories.  If an inode happens to
      get logged in this state and the system crashes before freeing the
      inode, log recovery will also fail on the broken inode.
      
      Therefore, allow zero-size symlinks and directories as long as the link
      count is zero; nobody will be able to open these files by handle so
      there isn't any risk of data exposure.
      
      Fixes: 3c6f46ea ("xfs: sanity check directory inode di_size")
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
      1ec9307f
    • Darrick J. Wong's avatar
      xfs: restrict when we try to align cow fork delalloc to cowextsz hints · 288e1f69
      Darrick J. Wong authored
      xfs/205 produces the following failure when always_cow is enabled:
      
        --- a/tests/xfs/205.out	2024-02-28 16:20:24.437887970 -0800
        +++ b/tests/xfs/205.out.bad	2024-06-03 21:13:40.584000000 -0700
        @@ -1,4 +1,5 @@
         QA output created by 205
         *** one file
        +   !!! disk full (expected)
         *** one file, a few bytes at a time
         *** done
      
      This is the result of overly aggressive attempts to align cow fork
      delalloc reservations to the CoW extent size hint.  Looking at the trace
      data, we're trying to append a single fsblock to the "fred" file.
      Trying to create a speculative post-eof reservation fails because
      there's not enough space.
      
      We then set @prealloc_blocks to zero and try again, but the cowextsz
      alignment code triggers, which expands our request for a 1-fsblock
      reservation into a 39-block reservation.  There's not enough space for
      that, so the whole write fails with ENOSPC even though there's
      sufficient space in the filesystem to allocate the single block that we
      need to land the write.
      
      There are two things wrong here -- first, we shouldn't be attempting
      speculative preallocations beyond what was requested when we're low on
      space.  Second, if we've already computed a posteof preallocation, we
      shouldn't bother trying to align that to the cowextsize hint.
      
      Fix both of these problems by adding a flag that only enables the
      expansion of the delalloc reservation to the cowextsize if we're doing a
      non-extending write, and only if we're not doing an ENOSPC retry.  This
      requires us to move the ENOSPC retry logic to xfs_bmapi_reserve_delalloc.
      
      I probably should have caught this six years ago when 6ca30729 was
      being reviewed, but oh well.  Update the comments to reflect what the
      code does now.
      
      Fixes: 6ca30729 ("xfs: bmap code cleanup")
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
      288e1f69
    • Christoph Hellwig's avatar
      xfs: fix freeing speculative preallocations for preallocated files · 610b2916
      Christoph Hellwig authored
      xfs_can_free_eofblocks returns false for files that have persistent
      preallocations unless the force flag is passed and there are delayed
      blocks.  This means it won't free delalloc reservations for files
      with persistent preallocations unless the force flag is set, and it
      will also free the persistent preallocations if the force flag is
      set and the file happens to have delayed allocations.
      
      Both of these are bad, so do away with the force flag and always free
      only post-EOF delayed allocations for files with the XFS_DIFLAG_PREALLOC
      or APPEND flags set.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
      610b2916
  2. 23 Jun, 2024 8 commits
  3. 22 Jun, 2024 19 commits
  4. 21 Jun, 2024 8 commits
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 35bb670d
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Two fixes: one in the ufs driver fixing an obvious memory leak and the
        other (with a core flag based update) trying to prevent USB crashes by
        stopping the core from issuing a request for the I/O Hints mode page"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: usb: uas: Do not query the IO Advice Hints Grouping mode page for USB/UAS devices
        scsi: core: Introduce the BLIST_SKIP_IO_HINTS flag
        scsi: ufs: core: Free memory allocated for model before reinit
      35bb670d
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2024-06-22' of https://gitlab.freedesktop.org/drm/kernel · d6c94157
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Still pretty quiet, two weeks worth of amdgpu fixes, with one i915 and
        one xe. I didn't get the drm-misc-fixes tree PR this week, but there
        was only one fix queued and I think it can wait another week, so seems
        pretty normal.
      
        xe:
         - Fix for invalid register access
      
        i915:
         - Fix conditions for joiner usage, it's not possible with eDP MSO
      
        amdgpu:
         - Fix display idle optimization race
         - Fix GPUVM TLB flush locking scope
         - IPS fix
         - GFX 9.4.3 harvesting fix
         - Runtime pm fix for shared buffers
         - DCN 3.5.x fixes
         - USB4 fix
         - RISC-V clang fix
         - Silence UBSAN warnings
         - MES11 fix
         - PSP 14.0.x fix"
      
      * tag 'drm-fixes-2024-06-22' of https://gitlab.freedesktop.org/drm/kernel:
        drm/xe/vf: Don't touch GuC irq registers if using memory irqs
        drm/amdgpu: init TA fw for psp v14
        drm/amdgpu: cleanup MES11 command submission
        drm/amdgpu: fix UBSAN warning in kv_dpm.c
        drm/radeon: fix UBSAN warning in kv_dpm.c
        drm/amd/display: Disable CONFIG_DRM_AMD_DC_FP for RISC-V with clang
        drm/amd/display: Attempt to avoid empty TUs when endpoint is DPIA
        drm/amd/display: change dram_clock_latency to 34us for dcn35
        drm/amd/display: Change dram_clock_latency to 34us for dcn351
        drm/amdgpu: revert "take runtime pm reference when we attach a buffer" v2
        drm/amdgpu: Indicate CU havest info to CP
        drm/amd/display: prevent register access while in IPS
        drm/amdgpu: fix locking scope when flushing tlb
        drm/amd/display: Remove redundant idle optimization check
        drm/i915/mso: using joiner is not possible with eDP MSO
      d6c94157
    • Linus Torvalds's avatar
      Merge tag 'ovl-fixes-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs · 264efe48
      Linus Torvalds authored
      Pull overlayfs fixes from Miklos Szeredi:
       "Fix two bugs, one originating in this cycle and one from 6.6"
      
      * tag 'ovl-fixes-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs:
        ovl: fix encoding fid for lower only root
        ovl: fix copy-up in tmpfile
      264efe48
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.10-20240621' of git://git.kernel.dk/linux · a502e727
      Linus Torvalds authored
      Pull io_uring fix from Jens Axboe:
       "Just a single cleanup for the fixed buffer iov_iter import.
      
        More cosmetic than anything else, but let's get it cleaned up as it's
        confusing"
      
      * tag 'io_uring-6.10-20240621' of git://git.kernel.dk/linux:
        io_uring/rsrc: fix incorrect assignment of iter->nr_segs in io_import_fixed
      a502e727
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · ffdf504c
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "Small bug fixes:
      
         - Prevent a crash in bnxt if the en and rdma drivers disagree on the
           MSI vectors
      
         - Have rxe memcpy inline data from the correct address
      
         - Fix rxe's validation of UD packets
      
         - Several mlx5 mr cache issues: bad lock balancing on error, missing
           propagation of the ATS property to the HW, wrong bucketing of freed
           mrs in some cases
      
         - Incorrect goto error unwind in mlx5 driver probe
      
         - Missed userspace input validation in mlx5 SRQ create
      
         - Incorrect uABI in MANA rejecting valid optional MR creation flags"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        RDMA/mana_ib: Ignore optional access flags for MRs
        RDMA/mlx5: Add check for srq max_sge attribute
        RDMA/mlx5: Fix unwind flow as part of mlx5_ib_stage_init_init
        RDMA/mlx5: Ensure created mkeys always have a populated rb_key
        RDMA/mlx5: Follow rb_key.ats when creating new mkeys
        RDMA/mlx5: Remove extra unlock on error path
        RDMA/rxe: Fix responder length checking for UD request packets
        RDMA/rxe: Fix data copy for IB_SEND_INLINE
        RDMA/bnxt_re: Fix the max msix vectors macro
      ffdf504c
    • Linus Torvalds's avatar
      Merge tag 'sound-6.10-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 4545981f
      Linus Torvalds authored
      Pull  more sound fixes from Takashi Iwai:
       "A follow-up fix for a random build issue, as well as another trivial
        HD-audio quirk"
      
      * tag 'sound-6.10-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda: Use imply for suggesting CONFIG_SERIAL_MULTI_INSTANTIATE
        ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14AHP9
      4545981f
    • Linus Torvalds's avatar
      Merge tag 'acpi-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 36c07583
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These address a possible NULL pointer dereference in the ACPICA code
        and quirk camera enumeration on multiple platforms where incorrect
        data are present in the platform firmware.
      
        Specifics:
      
         - Undo an ACPICA code change that attempted to keep operation regions
           within a page boundary, but allowed accesses to unmapped memory to
           occur (Raju Rangoju)
      
         - Ignore MIPI camera graph port nodes created with the help of the
           information from the ACPI tables on all Dell Tiger, Alder and
           Raptor Lake models as that information is reported to be invalid on
           the platforms in question (Hans de Goede)
      
         - Use new Intel CPU model matching macros in the MIPI DisCo for
           Imaging part of ACPI device enumeration (Hans de Goede)"
      
      * tag 'acpi-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: mipi-disco-img: Switch to new Intel CPU model defines
        ACPI: scan: Ignore camera graph port nodes on all Dell Tiger, Alder and Raptor Lake models
        ACPICA: Revert "ACPICA: avoid Info: mapping multiple BARs. Your kernel is fine."
      36c07583
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · fbe7ef3f
      Linus Torvalds authored
      Pull thermal control fixes from Rafael Wysocki:
       "These fix the Mediatek lvts_thermal driver, the Intel int340x driver,
        and the thermal core (two issues related to system suspend).
      
        Specifics:
      
         - Remove the filtered mode for mt8188 from lvts_thermal as it is not
           supported on this platform and fail the lvts_thermal initialization
           when the golden temperature is zero as that means the efuse data is
           not correctly set (Julien Panis)
      
         - Update the processor_thermal part of the Intel int340x driver to
           support shared interrupts as the processor thermal device interrupt
           may in fact be shared with PCI devices (Srinivas Pandruvada)
      
         - Synchronize the suspend-prepare and post-suspend actions of the
           thermal PM notifier to avoid a destructive race condition and
           change the priority of that notifier to the minimum to avoid
           interference between the work items spawned by it and the other
           PM notifiers during system resume (Rafael Wysocki)"
      
      * tag 'thermal-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal: int340x: processor_thermal: Support shared interrupts
        thermal: core: Change PM notifier priority to the minimum
        thermal: core: Synchronize suspend-prepare and post-suspend actions
        thermal/drivers/mediatek/lvts_thermal: Return error in case of invalid efuse data
        thermal/drivers/mediatek/lvts_thermal: Remove filtered mode for mt8188
      fbe7ef3f