1. 15 Apr, 2024 15 commits
    • Darrick J. Wong's avatar
      xfs: create a incompat flag for atomic file mapping exchanges · 1518646e
      Darrick J. Wong authored
      Create a incompat flag so that we only attempt to process file mapping
      exchange log items if the filesystem supports it, and a geometry flag to
      advertise support if it's present.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      1518646e
    • Darrick J. Wong's avatar
      xfs: introduce new file range exchange ioctl · 9a64d9b3
      Darrick J. Wong authored
      Introduce a new ioctl to handle exchanging ranges of bytes
      between files.  The goal here is to perform the exchange atomically with
      respect to applications -- either they see the file contents before the
      exchange or they see that A-B is now B-A, even if the kernel crashes.
      
      My original goal with all this code was to make it so that online repair
      can build a replacement directory or xattr structure in a temporary file
      and commit the repair by atomically exchanging all the data blocks
      between the two files.  However, I needed a way to test this mechanism
      thoroughly, so I've been evolving an ioctl interface since then.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      9a64d9b3
    • Darrick J. Wong's avatar
      vfs: export remap and write check helpers · 5b9932f6
      Darrick J. Wong authored
      Export these functions so that the next patch can use them to check the
      file ranges being passed to the XFS_IOC_EXCHANGE_RANGE operation.
      
      Cc: linux-fsdevel@vger.kernel.org
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      5b9932f6
    • Darrick J. Wong's avatar
      xfs: constify xfs_bmap_is_written_extent · 15f78aa3
      Darrick J. Wong authored
      This predicate doesn't modify the structure that's being passed in, so
      we can mark it const.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      15f78aa3
    • Darrick J. Wong's avatar
      xfs: refactor non-power-of-two alignment checks · ac5cebee
      Darrick J. Wong authored
      Create a helper function that can compute if a 64-bit number is an
      integer multiple of a 32-bit number, where the 32-bit number is not
      required to be an even power of two.  This is needed for some new code
      for the realtime device, where we can set 37k allocation units and then
      have to remap them.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      ac5cebee
    • Darrick J. Wong's avatar
      xfs: hoist multi-fsb allocation unit detection to a helper · 6b700a5b
      Darrick J. Wong authored
      Replace the open-coded logic to decide if a file has a multi-fsb
      allocation unit to a helper to make the code easier to read.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      6b700a5b
    • Darrick J. Wong's avatar
      xfs: create a new helper to return a file's allocation unit · ee20808d
      Darrick J. Wong authored
      Create a new helper function to calculate the fundamental allocation
      unit (i.e. the smallest unit of space we can allocate) of a file.
      Things are going to get hairy with range-exchange on the realtime
      device, so prepare for this now.
      
      Remove the static attribute from xfs_is_falloc_aligned since the next
      patch will need it.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      ee20808d
    • Darrick J. Wong's avatar
      xfs: declare xfs_file.c symbols in xfs_file.h · 00acb28d
      Darrick J. Wong authored
      Move the two public symbols in xfs_file.c to xfs_file.h.  We're about to
      add more public symbols in that source file, so let's finally create the
      header file.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      00acb28d
    • Darrick J. Wong's avatar
      xfs: move xfs_iops.c declarations out of xfs_inode.h · 3fc48445
      Darrick J. Wong authored
      Similarly, move declarations of public symbols of xfs_iops.c from
      xfs_inode.h to xfs_iops.h.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      3fc48445
    • Darrick J. Wong's avatar
      xfs: move inode lease breaking functions to xfs_inode.c · a4db266a
      Darrick J. Wong authored
      The lease breaking functions operate at the scope of the entire VFS
      inode, not subranges of a file.  Move them to xfs_inode.c since they're
      already declared in xfs_inode.h.  This cleanup moves us closer to
      having xfs_FOO.h declare only the symbols in xfs_FOO.c.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      a4db266a
    • Darrick J. Wong's avatar
      xfs: only clear log incompat flags at clean unmount · 5302a5c8
      Darrick J. Wong authored
      While reviewing the online fsck patchset, someone spied the
      xfs_swapext_can_use_without_log_assistance function and wondered why we
      go through this inverted-bitmask dance to avoid setting the
      XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT feature.
      
      (The same principles apply to the logged extended attribute update
      feature bit in the since-merged LARP series.)
      
      The reason for this dance is that xfs_add_incompat_log_feature is an
      expensive operation -- it forces the log, pushes the AIL, and then if
      nobody's beaten us to it, sets the feature bit and issues a synchronous
      write of the primary superblock.  That could be a one-time cost
      amortized over the life of the filesystem, but the log quiesce and cover
      operations call xfs_clear_incompat_log_features to remove feature bits
      opportunistically.  On a moderately loaded filesystem this leads to us
      cycling those bits on and off over and over, which hurts performance.
      
      Why do we clear the log incompat bits?  Back in ~2020 I think Dave and I
      had a conversation on IRC[2] about what the log incompat bits represent.
      IIRC in that conversation we decided that the log incompat bits protect
      unrecovered log items so that old kernels won't try to recover them and
      barf.  Since a clean log has no protected log items, we could clear the
      bits at cover/quiesce time.
      
      As Dave Chinner pointed out in the thread, clearing log incompat bits at
      unmount time has positive effects for golden root disk image generator
      setups, since the generator could be running a newer kernel than what
      gets written to the golden image -- if there are log incompat fields set
      in the golden image that was generated by a newer kernel/OS image
      builder then the provisioning host cannot mount the filesystem even
      though the log is clean and recovery is unnecessary to mount the
      filesystem.
      
      Given that it's expensive to set log incompat bits, we really only want
      to do that once per bit per mount.  Therefore, I propose that we only
      clear log incompat bits as part of writing a clean unmount record.  Do
      this by adding an operational state flag to the xfs mount that guards
      whether or not the feature bit clearing can actually take place.
      
      This eliminates the l_incompat_users rwsem that we use to protect a log
      cleaning operation from clearing a feature bit that a frontend thread is
      trying to set -- this lock adds another way to fail w.r.t. locking.  For
      the swapext series, I shard that into multiple locks just to work around
      the lockdep complaints, and that's fugly.
      
      Link: https://lore.kernel.org/linux-xfs/20240131230043.GA6180@frogsfrogsfrogs/Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
      5302a5c8
    • Darrick J. Wong's avatar
      xfs: fix error bailout in xrep_abt_build_new_trees · 98a778b4
      Darrick J. Wong authored
      Dan Carpenter reports:
      
      "Commit 4bdfd7d1 ("xfs: repair free space btrees") from Dec 15,
      2023 (linux-next), leads to the following Smatch static checker
      warning:
      
              fs/xfs/scrub/alloc_repair.c:781 xrep_abt_build_new_trees()
              warn: missing unwind goto?"
      
      That's a bug, so let's fix it.
      Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
      Fixes: 4bdfd7d1 ("xfs: repair free space btrees")
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      98a778b4
    • Darrick J. Wong's avatar
      xfs: fix potential AGI <-> ILOCK ABBA deadlock in xrep_dinode_findmode_walk_directory · 21ad2d03
      Darrick J. Wong authored
      xfs/399 found the following deadlock when fuzzing core.mode = ones:
      
      /proc/20506/task/20558/stack :
      [<0>] xfs_ilock+0xa0/0x240 [xfs]
      [<0>] xfs_ilock_data_map_shared+0x1b/0x20 [xfs]
      [<0>] xrep_dinode_findmode_walk_directory+0x69/0xe0 [xfs]
      [<0>] xrep_dinode_find_mode+0x103/0x2a0 [xfs]
      [<0>] xrep_dinode_mode+0x7c/0x120 [xfs]
      [<0>] xrep_dinode_core+0xed/0x2b0 [xfs]
      [<0>] xrep_dinode_problems+0x10/0x80 [xfs]
      [<0>] xrep_inode+0x6c/0xc0 [xfs]
      [<0>] xrep_attempt+0x64/0x1d0 [xfs]
      [<0>] xfs_scrub_metadata+0x365/0x840 [xfs]
      [<0>] xfs_scrubv_metadata+0x282/0x430 [xfs]
      [<0>] xfs_ioc_scrubv_metadata+0x149/0x1a0 [xfs]
      [<0>] xfs_file_ioctl+0xc68/0x1780 [xfs]
      /proc/20506/task/20559/stack :
      [<0>] xfs_buf_lock+0x3b/0x110 [xfs]
      [<0>] xfs_buf_find_lock+0x66/0x1c0 [xfs]
      [<0>] xfs_buf_get_map+0x208/0xc00 [xfs]
      [<0>] xfs_buf_read_map+0x5d/0x2c0 [xfs]
      [<0>] xfs_trans_read_buf_map+0x1b0/0x4c0 [xfs]
      [<0>] xfs_read_agi+0xbd/0x190 [xfs]
      [<0>] xfs_ialloc_read_agi+0x47/0x160 [xfs]
      [<0>] xfs_imap_lookup+0x69/0x1f0 [xfs]
      [<0>] xfs_imap+0x1fc/0x3d0 [xfs]
      [<0>] xfs_iget+0x357/0xd50 [xfs]
      [<0>] xchk_dir_actor+0x16e/0x330 [xfs]
      [<0>] xchk_dir_walk_block+0x164/0x1e0 [xfs]
      [<0>] xchk_dir_walk+0x13a/0x190 [xfs]
      [<0>] xchk_directory+0x1a2/0x2b0 [xfs]
      [<0>] xfs_scrub_metadata+0x2f4/0x840 [xfs]
      [<0>] xfs_scrubv_metadata+0x282/0x430 [xfs]
      [<0>] xfs_ioc_scrubv_metadata+0x149/0x1a0 [xfs]
      [<0>] xfs_file_ioctl+0xc68/0x1780 [xfs]
      
      Thread 20558 holds an AGI buffer and is trying to grab the ILOCK of the
      root directory.  Thread 20559 holds the root directory ILOCK and is
      trying to grab the AGI of an inode that is one of the root directory's
      children.  The AGI held by 20558 is the same buffer that 20559 is trying
      to acquire.  In other words, this is an ABBA deadlock.
      
      In general, the lock order is ILOCK and then AGI -- rename does this
      while preparing for an operation involving whiteouts or renaming files
      out of existence; and unlink does this when moving an inode to the
      unlinked list.  The only place where we do it in the opposite order is
      on the child during an icreate, but at that point the child is marked
      INEW and is not visible to other threads.
      
      Work around this deadlock by replacing the blocking ilock attempt with a
      nonblocking loop that aborts after 30 seconds.  Relax for a jiffy after
      a failed lock attempt.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      21ad2d03
    • Darrick J. Wong's avatar
      xfs: fix an AGI lock acquisition ordering problem in xrep_dinode_findmode · 2afd5276
      Darrick J. Wong authored
      While reviewing the next patch which fixes an ABBA deadlock between the
      AGI and a directory ILOCK, someone asked a question about why we're
      holding the AGI in the first place.  The reason for that is to quiesce
      the inode structures for that AG while we do a repair.
      
      I then realized that the xrep_dinode_findmode invokes xchk_iscan_iter,
      which walks the inobts (and hence the AGIs) to find all the inodes.
      This itself is also an ABBA vector, since the damaged inode could be in
      AG 5, which we hold while we scan AG 0 for directories.  5 -> 0 is not
      allowed.
      
      To address this, modify the iscan to allow trylock of the AGI buffer
      using the flags argument to xfs_ialloc_read_agi that the previous patch
      added.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      2afd5276
    • Darrick J. Wong's avatar
      xfs: pass xfs_buf lookup flags to xfs_*read_agi · 549d3c9a
      Darrick J. Wong authored
      Allow callers to pass buffer lookup flags to xfs_read_agi and
      xfs_ialloc_read_agi.  This will be used in the next patch to fix a
      deadlock in the online fsck inode scanner.
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      549d3c9a
  2. 14 Apr, 2024 10 commits
  3. 13 Apr, 2024 5 commits
    • Linus Torvalds's avatar
      Merge tag 'ata-6.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux · 7efd0a74
      Linus Torvalds authored
      Pull ata fixes from Damien Le Moal:
      
       - Add the mask_port_map parameter to the ahci driver. This is a
         follow-up to the recent snafu with the ASMedia controller and its
         virtual port hidding port-multiplier devices. As ASMedia confirmed
         that there is no way to determine if these slow-to-probe virtual
         ports are actually representing the ports of a port-multiplier
         devices, this new parameter allow masking ports to significantly
         speed up probing during system boot, resulting in shorter boot times.
      
       - A fix for an incorrect handling of a port unlock in
         ata_scsi_dev_rescan().
      
       - Allow command duration limits to be detected for ACS-4 devices are
         there are such devices out in the field.
      
      * tag 'ata-6.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
        ata: libata-core: Allow command duration limits detection for ACS-4 drives
        ata: libata-scsi: Fix ata_scsi_dev_rescan() error path
        ata: ahci: Add mask_port_map module parameter
      7efd0a74
    • Linus Torvalds's avatar
      Merge tag 'zonefs-6.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs · 76b0e9c4
      Linus Torvalds authored
      Pull zonefs fix from Damien Le Moal:
      
       - Suppress a coccicheck warning using str_plural()
      
      * tag 'zonefs-6.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs:
        zonefs: Use str_plural() to fix Coccinelle warning
      76b0e9c4
    • Linus Torvalds's avatar
      Merge tag 'v6.9-rc3-SMB3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · fa4022cb
      Linus Torvalds authored
      Pull smb client fixes from Steve French:
      
       - fix for oops in cifs_get_fattr of deleted files
      
       - fix for the remote open counter going negative in some directory
         lease cases
      
       - fix for mkfifo to instantiate dentry to avoid possible crash
      
       - important fix to allow handling key rotation for mount and remount
         (ie cases that are becoming more common when password that was used
         for the mount will expire soon but will be replaced by new password)
      
      * tag 'v6.9-rc3-SMB3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        smb3: fix broken reconnect when password changing on the server by allowing password rotation
        smb: client: instantiate when creating SFU files
        smb3: fix Open files on server counter going negative
        smb: client: fix NULL ptr deref in cifs_mark_open_handles_for_deleted_file()
      fa4022cb
    • Igor Pylypiv's avatar
      ata: libata-core: Allow command duration limits detection for ACS-4 drives · c0297e7d
      Igor Pylypiv authored
      Even though the command duration limits (CDL) feature was first added
      in ACS-5 (major version 12), there are some ACS-4 (major version 11)
      drives that implement CDL as well.
      
      IDENTIFY_DEVICE, SUPPORTED_CAPABILITIES, and CURRENT_SETTINGS log pages
      are mandatory in the ACS-4 standard so it should be safe to read these
      log pages on older drives implementing the ACS-4 standard.
      
      Fixes: 62e4a60e ("scsi: ata: libata: Detect support for command duration limits")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarIgor Pylypiv <ipylypiv@google.com>
      Signed-off-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      c0297e7d
    • Damien Le Moal's avatar
      ata: libata-scsi: Fix ata_scsi_dev_rescan() error path · 79336504
      Damien Le Moal authored
      Commit 0c76106c ("scsi: sd: Fix TCG OPAL unlock on system resume")
      incorrectly handles failures of scsi_resume_device() in
      ata_scsi_dev_rescan(), leading to a double call to
      spin_unlock_irqrestore() to unlock a device port. Fix this by redefining
      the goto labels used in case of errors and only unlock the port
      scsi_scan_mutex when scsi_resume_device() fails.
      
      Bug found with the Smatch static checker warning:
      
      	drivers/ata/libata-scsi.c:4774 ata_scsi_dev_rescan()
      	error: double unlocked 'ap->lock' (orig line 4757)
      Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
      Fixes: 0c76106c ("scsi: sd: Fix TCG OPAL unlock on system resume")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDamien Le Moal <dlemoal@kernel.org>
      Reviewed-by: default avatarNiklas Cassel <cassel@kernel.org>
      79336504
  4. 12 Apr, 2024 10 commits
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 8f2c0577
      Linus Torvalds authored
      Pull arm64 fix from Catalin Marinas:
       "Fix the TLBI RANGE operand calculation causing live migration under
        KVM/arm64 to miss dirty pages due to stale TLB entries"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: tlb: Fix TLBI RANGE operand
      8f2c0577
    • Linus Torvalds's avatar
      Merge tag 'soc-fixes-6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 678e14c7
      Linus Torvalds authored
      Pull SoC fixes from Arnd Bergmann:
       "The device tree changes this time are all for NXP i.MX platforms,
        addressing issues with clocks and regulators on i.MX7 and i.MX8.
      
        The old OMAP2 based Nokia N8x0 tablet get a couple of code fixes for
        regressions that came in.
      
        The ARM SCMI and FF-A firmware interfaces get a couple of minor bug
        fixes.
      
        A regression fix for RISC-V cache management addresses a problem with
        probe order on Sifive cores"
      
      * tag 'soc-fixes-6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (23 commits)
        MAINTAINERS: Change Krzysztof Kozlowski's email address
        arm64: dts: imx8qm-ss-dma: fix can lpcg indices
        arm64: dts: imx8-ss-dma: fix can lpcg indices
        arm64: dts: imx8-ss-dma: fix adc lpcg indices
        arm64: dts: imx8-ss-dma: fix pwm lpcg indices
        arm64: dts: imx8-ss-dma: fix spi lpcg indices
        arm64: dts: imx8-ss-conn: fix usb lpcg indices
        arm64: dts: imx8-ss-lsio: fix pwm lpcg indices
        ARM: dts: imx7s-warp: Pass OV2680 link-frequencies
        ARM: dts: imx7-mba7: Use 'no-mmc' property
        arm64: dts: imx8-ss-conn: fix usdhc wrong lpcg clock order
        arm64: dts: freescale: imx8mp-venice-gw73xx-2x: fix USB vbus regulator
        arm64: dts: freescale: imx8mp-venice-gw72xx-2x: fix USB vbus regulator
        cache: sifive_ccache: Partially convert to a platform driver
        firmware: arm_scmi: Make raw debugfs entries non-seekable
        firmware: arm_scmi: Fix wrong fastchannel initialization
        firmware: arm_ffa: Fix the partition ID check in ffa_notification_info_get()
        ARM: OMAP2+: fix USB regression on Nokia N8x0
        mmc: omap: restore original power up/down steps
        mmc: omap: fix deferred probe
        ...
      678e14c7
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · c7c4e130
      Linus Torvalds authored
      Pull iommu fixes from Joerg Roedel:
      
       - Intel VT-d Fixes:
           - Allocate local memory for PRQ page
           - Fix WARN_ON in iommu probe path
           - Fix wrong use of pasid config
      
       - AMD IOMMU Fixes:
           - Lock inversion fix
           - Log message severity fix
           - Disable SNP when v2 page-tables are used
      
       - Mediatek driver:
           - Fix module autoloading
      
      * tag 'iommu-fixes-v6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/amd: Change log message severity
        iommu/vt-d: Fix WARN_ON in iommu probe path
        iommu/vt-d: Allocate local memory for page request queue
        iommu/vt-d: Fix wrong use of pasid config
        iommu: mtk: fix module autoloading
        iommu/amd: Do not enable SNP when V2 page table is enabled
        iommu/amd: Fix possible irq lock inversion dependency issue
      c7c4e130
    • Linus Torvalds's avatar
      Merge tag 'pci-v6.9-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci · b3812ff0
      Linus Torvalds authored
      Pull pci fixes from Bjorn Helgaas:
      
       - Revert a quirk that prevented Secondary Bus Reset for LSI / Agere
         FW643.
      
         We thought the device was broken, but the reset does work correctly
         on other platforms, and the reset avoids leaking data out of VMs
         (Bjorn Helgaas)
      
       - Update MAINTAINERS to reflect that Gustavo Pimentel is no longer
         reachable (Manivannan Sadhasivam)
      
      * tag 'pci-v6.9-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
        Revert "PCI: Mark LSI FW643 to avoid bus reset"
        MAINTAINERS: Drop Gustavo Pimentel as PCI DWC Maintainer
      b3812ff0
    • Linus Torvalds's avatar
      Merge tag 'block-6.9-20240412' of git://git.kernel.dk/linux · d7ad0581
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - MD pull request via Song:
             - UAF fix (Yu)
      
       - Avoid out-of-bounds shift in blk-iocost (Rik)
      
       - Fix for q->blkg_list corruption (Ming)
      
       - Relax virt boundary mask/size segment checking (Ming)
      
      * tag 'block-6.9-20240412' of git://git.kernel.dk/linux:
        block: fix that blk_time_get_ns() doesn't update time after schedule
        block: allow device to have both virt_boundary_mask and max segment size
        block: fix q->blkg_list corruption during disk rebind
        blk-iocost: avoid out of bounds shift
        raid1: fix use-after-free for original bio in raid1_write_request()
      d7ad0581
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.9-20240412' of git://git.kernel.dk/linux · c7adbe2e
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
      
       - Fix for sigmask restoring while waiting for events (Alexey)
      
       - Typo fix in comment (Haiyue)
      
       - Fix for a msg_control retstore on SEND_ZC retries (Pavel)
      
      * tag 'io_uring-6.9-20240412' of git://git.kernel.dk/linux:
        io-uring: correct typo in comment for IOU_F_TWQ_LAZY_WAKE
        io_uring/net: restore msg_control on sendzc retry
        io_uring: Fix io_cqring_wait() not restoring sigmask on get_timespec64() failure
      c7adbe2e
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-6.9-rc4' of https://github.com/ceph/ceph-client · 90d3eaaf
      Linus Torvalds authored
      Pull ceph fixes from Ilya Dryomov:
       "Two CephFS fixes marked for stable and a MAINTAINERS update"
      
      * tag 'ceph-for-6.9-rc4' of https://github.com/ceph/ceph-client:
        MAINTAINERS: remove myself as a Reviewer for Ceph
        ceph: switch to use cap_delay_lock for the unlink delay list
        ceph: redirty page before returning AOP_WRITEPAGE_ACTIVATE
      90d3eaaf
    • Linus Torvalds's avatar
      Kconfig: add some hidden tabs on purpose · d5cf50da
      Linus Torvalds authored
      Commit d96c3600 ("tracing: Fix FTRACE_RECORD_RECURSION_SIZE Kconfig
      entry") removed a hidden tab because it apparently showed breakage in
      some third-party kernel config parsing tool.
      
      It wasn't clear what tool it was, but let's make sure it gets fixed.
      Because if you can't parse tabs as whitespace, you should not be parsing
      the kernel Kconfig files.
      
      In fact, let's make such breakage more obvious than some esoteric ftrace
      record size option.  If you can't parse tabs, you can't have page sizes.
      
      Yes, tab-vs-space confusion is sadly a traditional Unix thing, and
      'make' is famous for being broken in this regard.  But no, that does not
      mean that it's ok.
      
      I'd add more random tabs to our Kconfig files, but I don't want to make
      things uglier than necessary.  But it *might* bbe necessary if it turns
      out we see more of this kind of silly tooling.
      
      Fixes: d96c3600 ("tracing: Fix FTRACE_RECORD_RECURSION_SIZE Kconfig entry")
      Link: https://lore.kernel.org/lkml/CAHk-=wj-hLLN_t_m5OL4dXLaxvXKy_axuoJYXif7iczbfgAevQ@mail.gmail.com/Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d5cf50da
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 5939d451
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
      
       - Fix the buffer_percent accounting as it is dependent on three
         variables:
      
           1) pages_read - number of subbuffers read
           2) pages_lost - number of subbuffers lost due to overwrite
           3) pages_touched - number of pages that a writer entered
      
         These three counters only increment, and to know how many active
         pages there are on the buffer at any given time, the pages_read and
         pages_lost are subtracted from pages_touched.
      
         But the pages touched was incremented whenever any writer went to the
         next subbuffer even if it wasn't the only one, so it was incremented
         more than it should be causing the counter for how many subbuffers
         currently have content incorrect, which caused the buffer_percent
         that holds waiters until the ring buffer is filled to a given
         percentage to wake up early.
      
       - Fix warning of unused functions when PERF_EVENTS is not configured in
      
       - Replace bad tab with space in Kconfig for FTRACE_RECORD_RECURSION_SIZE
      
       - Fix to some kerneldoc function comments in eventfs code.
      
      * tag 'trace-v6.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        ring-buffer: Only update pages_touched when a new page is touched
        tracing: hide unused ftrace_event_id_fops
        tracing: Fix FTRACE_RECORD_RECURSION_SIZE Kconfig entry
        eventfs: Fix kernel-doc comments to functions
      5939d451
    • Linus Torvalds's avatar
      Merge tag 'mips-fixes_6.9_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · e00011a1
      Linus Torvalds authored
      Pull MIPS fix from Thomas Bogendoerfer:
       "Fix for syscall_get_nr() to make it work even if tracing is disabled"
      
      * tag 'mips-fixes_6.9_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: scall: Save thread_info.syscall unconditionally on entry
      e00011a1