1. 01 May, 2024 8 commits
    • David Howells's avatar
      netfs: New writeback implementation · 288ace2f
      David Howells authored
      The current netfslib writeback implementation creates writeback requests of
      contiguous folio data and then separately tiles subrequests over the space
      twice, once for the server and once for the cache.  This creates a few
      issues:
      
       (1) Every time there's a discontiguity or a change between writing to only
           one destination or writing to both, it must create a new request.
           This makes it harder to do vectored writes.
      
       (2) The folios don't have the writeback mark removed until the end of the
           request - and a request could be hundreds of megabytes.
      
       (3) In future, I want to support a larger cache granularity, which will
           require aggregation of some folios that contain unmodified data (which
           only need to go to the cache) and some which contain modifications
           (which need to be uploaded and stored to the cache) - but, currently,
           these are treated as discontiguous.
      
      There's also a move to get everyone to use writeback_iter() to extract
      writable folios from the pagecache.  That said, currently writeback_iter()
      has some issues that make it less than ideal:
      
       (1) there's no way to cancel the iteration, even if you find a "temporary"
           error that means the current folio and all subsequent folios are going
           to fail;
      
       (2) there's no way to filter the folios being written back - something
           that will impact Ceph with it's ordered snap system;
      
       (3) and if you get a folio you can't immediately deal with (say you need
           to flush the preceding writes), you are left with a folio hanging in
           the locked state for the duration, when really we should unlock it and
           relock it later.
      
      In this new implementation, I use writeback_iter() to pump folios,
      progressively creating two parallel, but separate streams and cleaning up
      the finished folios as the subrequests complete.  Either or both streams
      can contain gaps, and the subrequests in each stream can be of variable
      size, don't need to align with each other and don't need to align with the
      folios.
      
      Indeed, subrequests can cross folio boundaries, may cover several folios or
      a folio may be spanned by multiple folios, e.g.:
      
               +---+---+-----+-----+---+----------+
      Folios:  |   |   |     |     |   |          |
               +---+---+-----+-----+---+----------+
      
                 +------+------+     +----+----+
      Upload:    |      |      |.....|    |    |
                 +------+------+     +----+----+
      
               +------+------+------+------+------+
      Cache:   |      |      |      |      |      |
               +------+------+------+------+------+
      
      The progressive subrequest construction permits the algorithm to be
      preparing both the next upload to the server and the next write to the
      cache whilst the previous ones are already in progress.  Throttling can be
      applied to control the rate of production of subrequests - and, in any
      case, we probably want to write them to the server in ascending order,
      particularly if the file will be extended.
      
      Content crypto can also be prepared at the same time as the subrequests and
      run asynchronously, with the prepped requests being stalled until the
      crypto catches up with them.  This might also be useful for transport
      crypto, but that happens at a lower layer, so probably would be harder to
      pull off.
      
      The algorithm is split into three parts:
      
       (1) The issuer.  This walks through the data, packaging it up, encrypting
           it and creating subrequests.  The part of this that generates
           subrequests only deals with file positions and spans and so is usable
           for DIO/unbuffered writes as well as buffered writes.
      
       (2) The collector. This asynchronously collects completed subrequests,
           unlocks folios, frees crypto buffers and performs any retries.  This
           runs in a work queue so that the issuer can return to the caller for
           writeback (so that the VM can have its kswapd thread back) or async
           writes.
      
       (3) The retryer.  This pauses the issuer, waits for all outstanding
           subrequests to complete and then goes through the failed subrequests
           to reissue them.  This may involve reprepping them (with cifs, the
           credits must be renegotiated, and a subrequest may need splitting),
           and doing RMW for content crypto if there's a conflicting change on
           the server.
      
      [!] Note that some of the functions are prefixed with "new_" to avoid
      clashes with existing functions.  These will be renamed in a later patch
      that cuts over to the new algorithm.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarJeff 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: v9fs@lists.linux.dev
      cc: linux-afs@lists.infradead.org
      cc: netfs@lists.linux.dev
      cc: linux-fsdevel@vger.kernel.org
      288ace2f
    • David Howells's avatar
      netfs: Switch to using unsigned long long rather than loff_t · 7ba167c4
      David Howells authored
      Switch to using unsigned long long rather than loff_t in netfslib to avoid
      problems with the sign flipping in the maths when we're dealing with the
      byte at position 0x7fffffffffffffff.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      cc: Ilya Dryomov <idryomov@gmail.com>
      cc: Xiubo Li <xiubli@redhat.com>
      cc: netfs@lists.linux.dev
      cc: ceph-devel@vger.kernel.org
      cc: linux-fsdevel@vger.kernel.org
      7ba167c4
    • David Howells's avatar
      mm: Export writeback_iter() · 5a550a0c
      David Howells authored
      Export writeback_iter() so that it can be used by netfslib as a module.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      cc: Matthew Wilcox (Oracle) <willy@infradead.org>
      cc: Christoph Hellwig <hch@lst.de>
      cc: linux-mm@kvack.org
      5a550a0c
    • David Howells's avatar
      netfs: Use mempools for allocating requests and subrequests · d9f85a04
      David Howells authored
      Use mempools for allocating requests and subrequests in an effort to make
      sure that allocation always succeeds so that when performing writeback we
      can always make progress.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      cc: netfs@lists.linux.dev
      cc: linux-fsdevel@vger.kernel.org
      cc: linux-mm@kvack.org
      d9f85a04
    • David Howells's avatar
      netfs: Remove ->launder_folio() support · b4ff7b17
      David Howells authored
      Remove support for ->launder_folio() from netfslib and expect filesystems
      to use filemap_invalidate_inode() instead.  netfs_launder_folio() can then
      be got rid of.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarJeff 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: David Howells <dhowells@redhat.com>
      cc: Marc Dionne <marc.dionne@auristor.com>
      cc: Steve French <sfrench@samba.org>
      cc: Matthew Wilcox <willy@infradead.org>
      cc: linux-mm@kvack.org
      cc: linux-fsdevel@vger.kernel.org
      cc: netfs@lists.linux.dev
      cc: v9fs@lists.linux.dev
      cc: linux-afs@lists.infradead.org
      cc: ceph-devel@vger.kernel.org
      cc: linux-cifs@vger.kernel.org
      cc: devel@lists.orangefs.org
      b4ff7b17
    • David Howells's avatar
      afs: Use alternative invalidation to using launder_folio · d73065e6
      David Howells authored
      Use writepages-based flushing invalidation instead of
      invalidate_inode_pages2() and ->launder_folio().  This will allow
      ->launder_folio() to be removed eventually.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Marc Dionne <marc.dionne@auristor.com>
      cc: Jeff Layton <jlayton@kernel.org>
      cc: linux-afs@lists.infradead.org
      cc: netfs@lists.linux.dev
      cc: linux-fsdevel@vger.kernel.org
      d73065e6
    • David Howells's avatar
      9p: Use alternative invalidation to using launder_folio · 40fb4828
      David Howells authored
      Use writepages-based flushing invalidation instead of
      invalidate_inode_pages2() and ->launder_folio().  This will allow
      ->launder_folio() to be removed eventually.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      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: Jeff Layton <jlayton@kernel.org>
      cc: v9fs@lists.linux.dev
      cc: netfs@lists.linux.dev
      cc: linux-fsdevel@vger.kernel.org
      40fb4828
    • David Howells's avatar
      mm: Provide a means of invalidation without using launder_folio · 74e797d7
      David Howells authored
      Implement a replacement for launder_folio.  The key feature of
      invalidate_inode_pages2() is that it locks each folio individually, unmaps
      it to prevent mmap'd accesses interfering and calls the ->launder_folio()
      address_space op to flush it.  This has problems: firstly, each folio is
      written individually as one or more small writes; secondly, adjacent folios
      cannot be added so easily into the laundry; thirdly, it's yet another op to
      implement.
      
      Instead, use the invalidate lock to cause anyone wanting to add a folio to
      the inode to wait, then unmap all the folios if we have mmaps, then,
      conditionally, use ->writepages() to flush any dirty data back and then
      discard all pages.
      
      The invalidate lock prevents ->read_iter(), ->write_iter() and faulting
      through mmap all from adding pages for the duration.
      
      This is then used from netfslib to handle the flusing in unbuffered and
      direct writes.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Matthew Wilcox <willy@infradead.org>
      cc: Miklos Szeredi <miklos@szeredi.hu>
      cc: Trond Myklebust <trond.myklebust@hammerspace.com>
      cc: Christoph Hellwig <hch@lst.de>
      cc: Andrew Morton <akpm@linux-foundation.org>
      cc: Alexander Viro <viro@zeniv.linux.org.uk>
      cc: Christian Brauner <brauner@kernel.org>
      cc: Jeff Layton <jlayton@kernel.org>
      cc: linux-mm@kvack.org
      cc: linux-fsdevel@vger.kernel.org
      cc: netfs@lists.linux.dev
      cc: v9fs@lists.linux.dev
      cc: linux-afs@lists.infradead.org
      cc: ceph-devel@vger.kernel.org
      cc: linux-cifs@vger.kernel.org
      cc: linux-nfs@vger.kernel.org
      cc: devel@lists.orangefs.org
      74e797d7
  2. 29 Apr, 2024 6 commits
    • David Howells's avatar
      netfs: Use subreq_counter to allocate subreq debug_index values · 120b8781
      David Howells authored
      Use the subreq_counter in netfs_io_request to allocate subrequest
      debug_index values in read ops as well as write ops.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Jeff Layton <jlayton@kernel.org>
      cc: netfs@lists.linux.dev
      cc: linux-fsdevel@vger.kernel.org
      120b8781
    • David Howells's avatar
      netfs: Make netfs_io_request::subreq_counter an atomic_t · 93bf1cc0
      David Howells authored
      Make the netfs_io_request::subreq_counter, used to generate values for
      netfs_io_subrequest::debug_index, into an atomic_t so that it can be called
      from the retry thread at the same time as the app thread issuing writes.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      cc: netfs@lists.linux.dev
      cc: linux-fsdevel@vger.kernel.org
      93bf1cc0
    • David Howells's avatar
      netfs: Remove deprecated use of PG_private_2 as a second writeback flag · ae678317
      David Howells authored
      Remove the deprecated use of PG_private_2 in netfslib.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      cc: Matthew Wilcox (Oracle) <willy@infradead.org>
      cc: linux-cachefs@redhat.com
      cc: linux-fsdevel@vger.kernel.org
      cc: linux-mm@kvack.org
      ae678317
    • David Howells's avatar
      mm: Remove the PG_fscache alias for PG_private_2 · 2e9d7e4b
      David Howells authored
      Remove the PG_fscache alias for PG_private_2 and use the latter directly.
      Use of this flag for marking pages undergoing writing to the cache should
      be considered deprecated and the folios should be marked dirty instead and
      the write done in ->writepages().
      
      Note that PG_private_2 itself should be considered deprecated and up for
      future removal by the MM folks too.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      cc: Matthew Wilcox (Oracle) <willy@infradead.org>
      cc: Ilya Dryomov <idryomov@gmail.com>
      cc: Xiubo Li <xiubli@redhat.com>
      cc: Steve French <sfrench@samba.org>
      cc: Paulo Alcantara <pc@manguebit.com>
      cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>
      cc: Shyam Prasad N <sprasad@microsoft.com>
      cc: Tom Talpey <tom@talpey.com>
      cc: Bharath SM <bharathsm@microsoft.com>
      cc: Trond Myklebust <trond.myklebust@hammerspace.com>
      cc: Anna Schumaker <anna@kernel.org>
      cc: netfs@lists.linux.dev
      cc: ceph-devel@vger.kernel.org
      cc: linux-cifs@vger.kernel.org
      cc: linux-nfs@vger.kernel.org
      cc: linux-fsdevel@vger.kernel.org
      cc: linux-mm@kvack.org
      2e9d7e4b
    • David Howells's avatar
      netfs: Replace PG_fscache by setting folio->private and marking dirty · 2ff1e975
      David Howells authored
      When dirty data is being written to the cache, setting/waiting on/clearing
      the fscache flag is always done in tandem with setting/waiting on/clearing
      the writeback flag.  The netfslib buffered write routines wait on and set
      both flags and the write request cleanup clears both flags, so the fscache
      flag is almost superfluous.
      
      The reason it isn't superfluous is because the fscache flag is also used to
      indicate that data just read from the server is being written to the cache.
      The flag is used to prevent a race involving overlapping direct-I/O writes
      to the cache.
      
      Change this to indicate that a page is in need of being copied to the cache
      by placing a magic value in folio->private and marking the folios dirty.
      Then when the writeback code sees a folio marked in this way, it only
      writes it to the cache and not to the server.
      
      If a folio that has this magic value set is modified, the value is just
      replaced and the folio will then be uplodaded too.
      
      With this, PG_fscache is no longer required by the netfslib core, 9p and
      afs.
      
      Ceph and nfs, however, still need to use the old PG_fscache-based tracking.
      To deal with this, a flag, NETFS_ICTX_USE_PGPRIV2, now has to be set on the
      flags in the netfs_inode struct for those filesystems.  This reenables the
      use of PG_fscache in that inode.  9p and afs use the netfslib write helpers
      so get switched over; cifs, for the moment, does page-by-page manual access
      to the cache, so doesn't use PG_fscache and is unaffected.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      cc: Matthew Wilcox (Oracle) <willy@infradead.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: Ilya Dryomov <idryomov@gmail.com>
      cc: Xiubo Li <xiubli@redhat.com>
      cc: Steve French <sfrench@samba.org>
      cc: Paulo Alcantara <pc@manguebit.com>
      cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>
      cc: Shyam Prasad N <sprasad@microsoft.com>
      cc: Tom Talpey <tom@talpey.com>
      cc: Bharath SM <bharathsm@microsoft.com>
      cc: Trond Myklebust <trond.myklebust@hammerspace.com>
      cc: Anna Schumaker <anna@kernel.org>
      cc: netfs@lists.linux.dev
      cc: v9fs@lists.linux.dev
      cc: linux-afs@lists.infradead.org
      cc: ceph-devel@vger.kernel.org
      cc: linux-cifs@vger.kernel.org
      cc: linux-nfs@vger.kernel.org
      cc: linux-fsdevel@vger.kernel.org
      cc: linux-mm@kvack.org
      2ff1e975
    • David Howells's avatar
      netfs: Update i_blocks when write committed to pagecache · 5f24162f
      David Howells authored
      Update i_blocks when i_size is updated when we finish making a write to the
      pagecache to reflect the amount of space we think will be consumed.
      
      This maintains cifs commit dbfdff40 ("smb3:
      update allocation size more accurately on write completion") which would
      otherwise be removed by the cifs part of the netfs writeback rewrite.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      cc: Steve French <sfrench@samba.org>
      cc: Shyam Prasad N <nspmangalore@gmail.com>
      cc: Rohith Surabattula <rohiths.msft@gmail.com>
      cc: linux-cifs@vger.kernel.org
      cc: netfs@lists.linux.dev
      cc: linux-fsdevel@vger.kernel.org
      cc: linux-mm@kvack.org
      5f24162f
  3. 28 Apr, 2024 6 commits
  4. 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
  5. 26 Apr, 2024 11 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