1. 11 Apr, 2023 13 commits
    • NeilBrown's avatar
      NFSv3: handle out-of-order write replies. · 3db63daa
      NeilBrown authored
      NFSv3 includes pre/post wcc attributes which allow the client to
      determine if all changes to the file have been made by the client
      itself, or if any might have been made by some other client.
      
      If there are gaps in the pre/post ctime sequence it must be assumed that
      some other client changed the file in that gap and the local cache must
      be suspect.  The next time the file is opened the cache should be
      invalidated.
      
      Since Commit 1c341b77 ("NFS: Add deferred cache invalidation for
      close-to-open consistency violations") in linux 5.3 the Linux client has
      been triggering this invalidation.  The chunk in nfs_update_inode() in
      particularly triggers.
      
      Unfortunately Linux NFS assumes that all replies will be processed in
      the order sent, and will arrive in the order processed.  This is not
      true in general.  Consequently Linux NFS might ignore the wcc info in a
      WRITE reply because the reply is in response to a WRITE that was sent
      before some other request for which a reply has already been seen.  This
      is detected by Linux using the gencount tests in nfs_inode_attr_cmp().
      
      Also, when the gencount tests pass it is still possible that the request
      were processed on the server in a different order, and a gap seen in
      the ctime sequence might be filled in by a subsequent reply, so gaps
      should not immediately trigger delayed invalidation.
      
      The net result is that writing to a server and then reading the file
      back can result in going to the server for the read rather than serving
      it from cache - all because a couple of replies arrived out-of-order.
      This is a performance regression over kernels before 5.3, though the
      change in 5.3 is a correctness improvement.
      
      This has been seen with Linux writing to a Netapp server which
      occasionally re-orders requests.  In testing the majority of requests
      were in-order, but a few (maybe 2 or three at a time) could be
      re-ordered.
      
      This patch addresses the problem by recording any gaps seen in the
      pre/post ctime sequence and not triggering invalidation until either
      there are too many gaps to fit in the table, or until there are no more
      active writes and the remaining gaps cannot be resolved.
      
      We allocate a table of 16 gaps on demand.  If the allocation fails we
      revert to current behaviour which is of little cost as we are unlikely
      to be able to cache the writes anyway.
      
      In the table we store "start->end" pair when iversion is updated and
      "end<-start" pairs pre/post pairs reported by the server.  Usually these
      exactly cancel out and so nothing is stored.  When there are
      out-of-order replies we do store gaps and these will eventually be
      cancelled against later replies when this client is the only writer.
      
      If the final write is out-of-order there may be one gap remaining when
      the file is closed.  This will be noticed and if there is precisely on
      gap and if the iversion can be advanced to match it, then we do so.
      
      This patch makes no attempt to handle directories correctly.  The same
      problem potentially exists in the out-of-order replies to create/unlink
      requests can cause future lookup requires to be sent to the server
      unnecessarily.  A similar scheme using the same primitives could be used
      to notice and handle out-of-order replies.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      3db63daa
    • Dave Wysochanski's avatar
      NFS: Remove fscache specific trace points and NFS_INO_FSCACHE bit · 03f5bd75
      Dave Wysochanski authored
      The NFS specific trace points are no longer needed as tracing is well
      covered by netfs and fscache.
      Signed-off-by: default avatarDave Wysochanski <dwysocha@redhat.com>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      Tested-by: default avatarDaire Byrne <daire@dneg.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      03f5bd75
    • Dave Wysochanski's avatar
      NFS: Remove all NFSIOS_FSCACHE counters due to conversion to netfs API · 0631d5e0
      Dave Wysochanski authored
      The old NFSIOS_FSCACHE counters are no longer accurate or useful with
      the conversion to the new netfs API.  The new API does not have a page
      based interface, and so the counters in nfs_stat_fscachecounters are
      no longer obtainable.  The new netfs the API has extensive statistics
      inside /proc/fs/fscache/stats so we no longer need NFS specific fscache
      stats.
      
      Note this also removes the 'fsc:' line from /proc/self/mountstats so
      it will be a user-visible change.
      Signed-off-by: default avatarDave Wysochanski <dwysocha@redhat.com>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      Tested-by: default avatarDaire Byrne <daire@dneg.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      0631d5e0
    • Dave Wysochanski's avatar
      NFS: Convert buffered read paths to use netfs when fscache is enabled · 000dbe0b
      Dave Wysochanski authored
      Convert the NFS buffered read code paths to corresponding netfs APIs,
      but only when fscache is configured and enabled.
      
      The netfs API defines struct netfs_request_ops which must be filled
      in by the network filesystem.  For NFS, we only need to define 5 of
      the functions, the main one being the issue_read() function.
      The issue_read() function is called by the netfs layer when a read
      cannot be fulfilled locally, and must be sent to the server (either
      the cache is not active, or it is active but the data is not available).
      Once the read from the server is complete, netfs requires a call to
      netfs_subreq_terminated() which conveys either how many bytes were read
      successfully, or an error.  Note that issue_read() is called with a
      structure, netfs_io_subrequest, which defines the IO requested, and
      contains a start and a length (both in bytes), and assumes the underlying
      netfs will return a either an error on the whole region, or the number
      of bytes successfully read.
      
      The NFS IO path is page based and the main APIs are the pgio APIs defined
      in pagelist.c.  For the pgio APIs, there is no way for the caller to
      know how many RPCs will be sent and how the pages will be broken up
      into underlying RPCs, each of which will have their own completion and
      return code.  In contrast, netfs is subrequest based, a single
      subrequest may contain multiple pages, and a single subrequest is
      initiated with issue_read() and terminated with netfs_subreq_terminated().
      Thus, to utilze the netfs APIs, NFS needs some way to accommodate
      the netfs API requirement on the single response to the whole
      subrequest, while also minimizing disruptive changes to the NFS
      pgio layer.
      
      The approach taken with this patch is to allocate a small structure
      for each nfs_netfs_issue_read() call, store the final error and number
      of bytes successfully transferred in the structure, and update these values
      as each RPC completes.  The refcount on the structure is used as a marker
      for the last RPC completion, is incremented in nfs_netfs_read_initiate(),
      and decremented inside nfs_netfs_read_completion(), when a nfs_pgio_header
      contains a valid pointer to the data.  On the final put (which signals
      the final outstanding RPC is complete) in nfs_netfs_read_completion(),
      call netfs_subreq_terminated() with either the final error value (if
      one or more READs complete with an error) or the number of bytes
      successfully transferred (if all RPCs complete successfully).  Note
      that when all RPCs complete successfully, the number of bytes transferred
      is capped to the length of the subrequest.  Capping the transferred length
      to the subrequest length prevents "Subreq overread" warnings from netfs.
      This is due to the "aligned_len" in nfs_pageio_add_page(), and the
      corner case where NFS requests a full page at the end of the file,
      even when i_size reflects only a partial page (NFS overread).
      Signed-off-by: default avatarDave Wysochanski <dwysocha@redhat.com>
      Tested-by: default avatarDaire Byrne <daire@dneg.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      000dbe0b
    • Dave Wysochanski's avatar
      NFS: Configure support for netfs when NFS fscache is configured · 88a4d7bd
      Dave Wysochanski authored
      As first steps for support of the netfs library when NFS_FSCACHE is
      configured, add NETFS_SUPPORT to Kconfig and add the required netfs_inode
      into struct nfs_inode.
      
      Using netfs requires we move the VFS inode structure to be stored
      inside struct netfs_inode, along with the fscache_cookie.
      Thus, if NFS_FSCACHE is configured, place netfs_inode inside an
      anonymous union so the vfs_inode memory is the same and we do
      not need to modify other non-fscache areas of NFS.
      In addition, inside the NFS fscache code, use the new helpers,
      netfs_inode() and netfs_i_cookie() helpers, and remove our own
      helper, nfs_i_fscache().
      
      Later patches will convert NFS fscache to fully use netfs.
      Signed-off-by: default avatarDave Wysochanski <dwysocha@redhat.com>
      Tested-by: default avatarDaire Byrne <daire@dneg.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      88a4d7bd
    • Dave Wysochanski's avatar
      NFS: Rename readpage_async_filler to nfs_read_add_folio · 01c3a400
      Dave Wysochanski authored
      Rename readpage_async_filler to nfs_read_add_folio to
      better reflect what this function does (add a folio to
      the nfs_pageio_descriptor), and simplify arguments to
      this function by removing struct nfs_readdesc.
      Signed-off-by: default avatarDave Wysochanski <dwysocha@redhat.com>
      Tested-by: default avatarDaire Byrne <daire@dneg.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      01c3a400
    • Luis Chamberlain's avatar
      sunrpc: simplify one-level sysctl registration for debug_table · 703c6d03
      Luis Chamberlain authored
      There is no need to declare an extra tables to just create directory,
      this can be easily be done with a prefix path with register_sysctl().
      
      Simplify this registration.
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      703c6d03
    • Luis Chamberlain's avatar
      sunrpc: move sunrpc_table and proc routines above · 32e356be
      Luis Chamberlain authored
      No need to do a forward declaration for sunrpc_table, just move
      the sysctls up as everyone else does it. This will make the next
      change easier to read. This change produces no functional changes.
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      32e356be
    • Luis Chamberlain's avatar
      sunrpc: simplify one-level sysctl registration for xs_tunables_table · c946cb69
      Luis Chamberlain authored
      There is no need to declare an extra tables to just create directory,
      this can be easily be done with a prefix path with register_sysctl().
      
      Simplify this registration.
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      c946cb69
    • Luis Chamberlain's avatar
      sunrpc: simplify one-level sysctl registration for xr_tunables_table · 17c6d0ce
      Luis Chamberlain authored
      There is no need to declare an extra tables to just create directory,
      this can be easily be done with a prefix path with register_sysctl().
      
      Simplify this registration.
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      17c6d0ce
    • Luis Chamberlain's avatar
      nfs: simplify two-level sysctl registration for nfs_cb_sysctls · 39724217
      Luis Chamberlain authored
      There is no need to declare two tables to just create directories,
      this can be easily be done with a prefix path with register_sysctl().
      
      Simplify this registration.
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      39724217
    • Luis Chamberlain's avatar
      nfs: simplify two-level sysctl registration for nfs4_cb_sysctls · a2183160
      Luis Chamberlain authored
      There is no need to declare two tables to just create directories,
      this can be easily be done with a prefix path with register_sysctl().
      
      Simplify this registration.
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      a2183160
    • Luis Chamberlain's avatar
      lockd: simplify two-level sysctl registration for nlm_sysctls · c1d889cf
      Luis Chamberlain authored
      There is no need to declare two tables to just create directories,
      this can be easily be done with a prefix path with register_sysctl().
      
      Simplify this registration.
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      c1d889cf
  2. 10 Apr, 2023 1 commit
  3. 09 Apr, 2023 5 commits
    • Linus Torvalds's avatar
      Linux 6.3-rc6 · 09a9639e
      Linus Torvalds authored
      09a9639e
    • Linus Torvalds's avatar
      Merge tag 'perf_urgent_for_v6.3_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · faf8f418
      Linus Torvalds authored
      Pull perf fixes from Borislav Petkov:
      
       - Fix "same task" check when redirecting event output
      
       - Do not wait unconditionally for RCU on the event migration path if
         there are no events to migrate
      
      * tag 'perf_urgent_for_v6.3_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/core: Fix the same task check in perf_event_set_output
        perf: Optimize perf_pmu_migrate_context()
      faf8f418
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v6.3_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4ba115e2
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - Add a new Intel Arrow Lake CPU model number
      
       - Fix a confusion about how to check the version of the ACPI spec which
         supports a "online capable" bit in the MADT table which lead to a
         bunch of boot breakages with Zen1 systems and VMs
      
      * tag 'x86_urgent_for_v6.3_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu: Add model number for Intel Arrow Lake processor
        x86/acpi/boot: Correct acpi_is_processor_usable() check
        x86/ACPI/boot: Use FADT version to check support for online capable
      4ba115e2
    • Linus Torvalds's avatar
      Merge tag 'cxl-fixes-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl · c08cfd67
      Linus Torvalds authored
      Pull compute express link (cxl) fixes from Dan Williams:
       "Several fixes for driver startup regressions that landed during the
        merge window as well as some older bugs.
      
        The regressions were due to a lack of testing with what the CXL
        specification calls Restricted CXL Host (RCH) topologies compared to
        the testing with Virtual Host (VH) CXL topologies. A VH topology is
        typical PCIe while RCH topologies map CXL endpoints as Root Complex
        Integrated endpoints. The impact is some driver crashes on startup.
      
        This merge window also added compatibility for range registers (the
        mechanism that CXL 1.1 defined for mapping memory) to treat them like
        HDM decoders (the mechanism that CXL 2.0 defined for mapping
        Host-managed Device Memory). That work collided with the new region
        enumeration code that was tested with CXL 2.0 setups, and fails with
        crashes at startup.
      
        Lastly, the DOE (Data Object Exchange) implementation for retrieving
        an ACPI-like data table from CXL devices is being reworked for v6.4.
        Several fixes fell out of that work that are suitable for v6.3.
      
        All of this has been in linux-next for a while, and all reported
        issues [1] have been addressed.
      
        Summary:
      
         - Fix several issues with region enumeration in RCH topologies that
           can trigger crashes on driver startup or shutdown.
      
         - Fix CXL DVSEC range register compatibility versus region
           enumeration that leads to startup crashes
      
         - Fix CDAT endiannes handling
      
         - Fix multiple buffer handling boundary conditions
      
         - Fix Data Object Exchange (DOE) workqueue usage vs
           CONFIG_DEBUG_OBJECTS warn splats"
      
      Link: http://lore.kernel.org/r/20230405075704.33de8121@canb.auug.org.au [1]
      
      * tag 'cxl-fixes-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
        cxl/hdm: Extend DVSEC range register emulation for region enumeration
        cxl/hdm: Limit emulation to the number of range registers
        cxl/region: Move coherence tracking into cxl_region_attach()
        cxl/region: Fix region setup/teardown for RCDs
        cxl/port: Fix find_cxl_root() for RCDs and simplify it
        cxl/hdm: Skip emulation when driver manages mem_enable
        cxl/hdm: Fix double allocation of @cxlhdm
        PCI/DOE: Fix memory leak with CONFIG_DEBUG_OBJECTS=y
        PCI/DOE: Silence WARN splat with CONFIG_DEBUG_OBJECTS=y
        cxl/pci: Handle excessive CDAT length
        cxl/pci: Handle truncated CDAT entries
        cxl/pci: Handle truncated CDAT header
        cxl/pci: Fix CDAT retrieval on big endian
      c08cfd67
    • Linus Torvalds's avatar
      Merge tag '6.3-rc5-smb3-cifs-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · cdc9718d
      Linus Torvalds authored
      Pull cifs client fixes from Steve French:
       "Two cifs/smb3 client fixes, one for stable:
      
         - double lock fix for a cifs/smb1 reconnect path
      
         - DFS prefixpath fix for reconnect when server moved"
      
      * tag '6.3-rc5-smb3-cifs-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: double lock in cifs_reconnect_tcon()
        cifs: sanitize paths in cifs_update_super_prepath.
      cdc9718d
  4. 08 Apr, 2023 9 commits
    • Linus Torvalds's avatar
      Merge tag 'char-misc-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 68047c48
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are a small set of various small driver changes for 6.3-rc6.
        Included in here are:
      
         - iio driver fixes for reported problems
      
         - coresight hwtracing bugfix for reported problem
      
         - small counter driver bugfixes
      
        All have been in linux-next for a while with no reported problems"
      
      * tag 'char-misc-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        coresight: etm4x: Do not access TRCIDR1 for identification
        coresight-etm4: Fix for() loop drvdata->nr_addr_cmp range bug
        iio: adc: ti-ads7950: Set `can_sleep` flag for GPIO chip
        iio: adc: palmas_gpadc: fix NULL dereference on rmmod
        counter: 104-quad-8: Fix Synapse action reported for Index signals
        counter: 104-quad-8: Fix race condition between FLAG and CNTR reads
        iio: adc: max11410: fix read_poll_timeout() usage
        iio: dac: cio-dac: Fix max DAC write value check for 12-bit
        iio: light: cm32181: Unregister second I2C client if present
        iio: accel: kionix-kx022a: Get the timestamp from the driver's private data in the trigger_handler
        iio: adc: ad7791: fix IRQ flags
        iio: buffer: make sure O_NONBLOCK is respected
        iio: buffer: correctly return bytes written in output buffers
        iio: light: vcnl4000: Fix WARN_ON on uninitialized lock
        iio: adis16480: select CONFIG_CRC32
        drivers: iio: adc: ltc2497: fix LSB shift
        iio: adc: qcom-spmi-adc5: Fix the channel name
      68047c48
    • Linus Torvalds's avatar
      Merge tag 'tty-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · aa46fe36
      Linus Torvalds authored
      Pull tty/serial driver fixes from Greg KH:
       "Here are some small tty and serial driver fixes for some reported
        problems:
      
         - fsl_uart driver bugfixes
      
         - sh-sci serial driver bugfixes
      
         - renesas serial driver DT binding bugfixes
      
         - 8250 DMA bugfix
      
        All of these have been in linux-next for a while with no reported
        problems"
      
      * tag 'tty-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        tty: serial: sh-sci: Fix Rx on RZ/G2L SCI
        tty: serial: fsl_lpuart: fix crash in lpuart_uport_is_active
        tty: serial: fsl_lpuart: avoid checking for transfer complete when UARTCTRL_SBK is asserted in lpuart32_tx_empty
        serial: 8250: Prevent starting up DMA Rx on THRI interrupt
        dt-bindings: serial: renesas,scif: Fix 4th IRQ for 4-IRQ SCIFs
        tty: serial: sh-sci: Fix transmit end interrupt handler
      aa46fe36
    • Linus Torvalds's avatar
      Merge tag 'usb-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · a211b1c0
      Linus Torvalds authored
      Pull USB bugfixes from Greg KH:
       "Here are some small USB bugfixes for 6.3-rc6 that have been in my
        tree, and in linux-next, for a while. Included in here are:
      
         - new usb-serial driver device ids
      
         - xhci bugfixes for reported problems
      
         - gadget driver bugfixes for reported problems
      
         - dwc3 new device id
      
        All have been in linux-next with no reported problems"
      
      * tag 'usb-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: cdnsp: Fixes error: uninitialized symbol 'len'
        usb: gadgetfs: Fix ep_read_iter to handle ITER_UBUF
        usb: gadget: f_fs: Fix ffs_epfile_read_iter to handle ITER_UBUF
        usb: typec: altmodes/displayport: Fix configure initial pin assignment
        usb: dwc3: pci: add support for the Intel Meteor Lake-S
        xhci: Free the command allocated for setting LPM if we return early
        Revert "usb: xhci-pci: Set PROBE_PREFER_ASYNCHRONOUS"
        xhci: also avoid the XHCI_ZERO_64B_REGS quirk with a passthrough iommu
        USB: serial: option: add Quectel RM500U-CN modem
        usb: xhci: tegra: fix sleep in atomic call
        USB: serial: option: add Telit FE990 compositions
        USB: serial: cp210x: add Silicon Labs IFS-USB-DATACABLE IDs
      a211b1c0
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · a79d5c76
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Four small fixes, all in drivers. They're all one or two lines except
        for the ufs one, but that's a simple revert of a previous feature"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: iscsi_tcp: Check that sock is valid before iscsi_set_param()
        scsi: qla2xxx: Fix memory leak in qla2x00_probe_one()
        scsi: mpi3mr: Handle soft reset in progress fault code (0xF002)
        scsi: Revert "scsi: ufs: core: Initialize devfreq synchronously"
      a79d5c76
    • Linus Torvalds's avatar
      Merge tag 'block-6.3-2023-04-06' of git://git.kernel.dk/linux · da0af3c5
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - Ensure that ublk always reads the whole sqe upfront (me)
      
       - Fix for a block size probing issue with ublk (Ming)
      
       - Fix for the bio based polling (Keith)
      
       - NVMe pull request via Christoph:
            - fix discard support without oncs (Keith Busch)
      
       - Partition scan error handling regression fix (Yu)
      
      * tag 'block-6.3-2023-04-06' of git://git.kernel.dk/linux:
        block: don't set GD_NEED_PART_SCAN if scan partition failed
        block: ublk: make sure that block size is set correctly
        ublk: read any SQE values upfront
        nvme: fix discard support without oncs
        blk-mq: directly poll requests
      da0af3c5
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.3-2023-04-06' of git://git.kernel.dk/linux · d3f05a4c
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Just two minor fixes for provided buffers - one where we could
        potentially leak a buffer, and one where the returned values was
        off-by-one in some cases"
      
      * tag 'io_uring-6.3-2023-04-06' of git://git.kernel.dk/linux:
        io_uring: fix memory leak when removing provided buffers
        io_uring: fix return value when removing provided buffers
      d3f05a4c
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-6.3-2023-04-08' of git://git.infradead.org/users/hch/dma-mapping · 973ad544
      Linus Torvalds authored
      Pull dma-mapping fix from Christoph Hellwig:
      
       - fix a braino in the swiotlb alignment check fix (Petr Tesarik)
      
      * tag 'dma-mapping-6.3-2023-04-08' of git://git.infradead.org/users/hch/dma-mapping:
        swiotlb: fix a braino in the alignment check fix
      973ad544
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.3-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 1a8a804a
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
       "A couple more minor fixes:
      
         - Reset direct->addr back to its original value on error in updating
           the direct trampoline code
      
         - Make lastcmd_mutex static"
      
      * tag 'trace-v6.3-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        tracing/synthetic: Make lastcmd_mutex static
        ftrace: Fix issue that 'direct->addr' not restored in modify_ftrace_direct()
      1a8a804a
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2023-04-07-16-23' of... · 6fda0bb8
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2023-04-07-16-23' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull MM fixes from Andrew Morton:
       "28 hotfixes.
      
        23 are cc:stable and the other five address issues which were
        introduced during this merge cycle.
      
        20 are for MM and the remainder are for other subsystems"
      
      * tag 'mm-hotfixes-stable-2023-04-07-16-23' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (28 commits)
        maple_tree: fix a potential concurrency bug in RCU mode
        maple_tree: fix get wrong data_end in mtree_lookup_walk()
        mm/swap: fix swap_info_struct race between swapoff and get_swap_pages()
        nilfs2: fix sysfs interface lifetime
        mm: take a page reference when removing device exclusive entries
        mm: vmalloc: avoid warn_alloc noise caused by fatal signal
        nilfs2: initialize "struct nilfs_binfo_dat"->bi_pad field
        nilfs2: fix potential UAF of struct nilfs_sc_info in nilfs_segctor_thread()
        zsmalloc: document freeable stats
        zsmalloc: document new fullness grouping
        fsdax: force clear dirty mark if CoW
        mm/hugetlb: fix uffd wr-protection for CoW optimization path
        mm: enable maple tree RCU mode by default
        maple_tree: add RCU lock checking to rcu callback functions
        maple_tree: add smp_rmb() to dead node detection
        maple_tree: fix write memory barrier of nodes once dead for RCU mode
        maple_tree: remove extra smp_wmb() from mas_dead_leaves()
        maple_tree: fix freeing of nodes in rcu mode
        maple_tree: detect dead nodes in mas_start()
        maple_tree: be more cautious about dead nodes
        ...
      6fda0bb8
  5. 07 Apr, 2023 6 commits
  6. 06 Apr, 2023 6 commits
    • Steven Rostedt (Google)'s avatar
      tracing/synthetic: Make lastcmd_mutex static · 31c68396
      Steven Rostedt (Google) authored
      The lastcmd_mutex is only used in trace_events_synth.c and should be
      static.
      
      Link: https://lore.kernel.org/linux-trace-kernel/202304062033.cRStgOuP-lkp@intel.com/
      Link: https://lore.kernel.org/linux-trace-kernel/20230406111033.6e26de93@gandalf.local.home
      
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Tze-nan Wu <Tze-nan.Wu@mediatek.com>
      Fixes: 4ccf11c4 ("tracing/synthetic: Fix races on freeing last_cmd")
      Reviewed-by: default avatarMukesh Ojha <quic_mojha@quicinc.com>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      31c68396
    • Linus Torvalds's avatar
      Merge tag 'net-6.3-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · f2afccfe
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from wireless and can.
      
        Current release - regressions:
      
         - wifi: mac80211:
            - fix potential null pointer dereference
            - fix receiving mesh packets in forwarding=0 networks
            - fix mesh forwarding
      
        Current release - new code bugs:
      
         - virtio/vsock: fix leaks due to missing skb owner
      
        Previous releases - regressions:
      
         - raw: fix NULL deref in raw_get_next().
      
         - sctp: check send stream number after wait_for_sndbuf
      
         - qrtr:
            - fix a refcount bug in qrtr_recvmsg()
            - do not do DEL_SERVER broadcast after DEL_CLIENT
      
         - wifi: brcmfmac: fix SDIO suspend/resume regression
      
         - wifi: mt76: fix use-after-free in fw features query.
      
         - can: fix race between isotp_sendsmg() and isotp_release()
      
         - eth: mtk_eth_soc: fix remaining throughput regression
      
         - eth: ice: reset FDIR counter in FDIR init stage
      
        Previous releases - always broken:
      
         - core: don't let netpoll invoke NAPI if in xmit context
      
         - icmp: guard against too small mtu
      
         - ipv6: fix an uninit variable access bug in __ip6_make_skb()
      
         - wifi: mac80211: fix the size calculation of
           ieee80211_ie_len_eht_cap()
      
         - can: fix poll() to not report false EPOLLOUT events
      
         - eth: gve: secure enough bytes in the first TX desc for all TCP
           pkts"
      
      * tag 'net-6.3-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (47 commits)
        net: stmmac: check fwnode for phy device before scanning for phy
        net: stmmac: Add queue reset into stmmac_xdp_open() function
        selftests: net: rps_default_mask.sh: delete veth link specifically
        net: fec: make use of MDIO C45 quirk
        can: isotp: fix race between isotp_sendsmg() and isotp_release()
        can: isotp: isotp_ops: fix poll() to not report false EPOLLOUT events
        can: isotp: isotp_recvmsg(): use sock_recv_cmsgs() to get SOCK_RXQ_OVFL infos
        can: j1939: j1939_tp_tx_dat_new(): fix out-of-bounds memory access
        gve: Secure enough bytes in the first TX desc for all TCP pkts
        netlink: annotate lockless accesses to nlk->max_recvmsg_len
        ethtool: reset #lanes when lanes is omitted
        ping: Fix potentail NULL deref for /proc/net/icmp.
        raw: Fix NULL deref in raw_get_next().
        ice: Reset FDIR counter in FDIR init stage
        ice: fix wrong fallback logic for FDIR
        net: stmmac: fix up RX flow hash indirection table when setting channels
        net: ethernet: ti: am65-cpsw: Fix mdio cleanup in probe
        wifi: mt76: ignore key disable commands
        wifi: ath11k: reduce the MHI timeout to 20s
        ipv6: Fix an uninit variable access bug in __ip6_make_skb()
        ...
      f2afccfe
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-fixes-6.3-rc6' of... · 8f2e1a85
      Linus Torvalds authored
      Merge tag 'linux-kselftest-fixes-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull Kselftest fixes from Shuah Khan:
       "One single fix to mount_setattr_test build failure"
      
      * tag 'linux-kselftest-fixes-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests mount: Fix mount_setattr_test builds failed
      8f2e1a85
    • Linus Torvalds's avatar
      Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd · 105b64c8
      Linus Torvalds authored
      Pull iommufd fixes from Jason Gunthorpe:
      
       - An invalid VA range can be be put in a pages and eventually trigger
         WARN_ON, reject it early
      
       - Use of the wrong start index value when doing the complex batch carry
         scheme
      
       - Wrong store ordering resulting in corrupting data used in a later
         calculation that corrupted the batch structure during carry
      
      * tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd:
        iommufd: Do not corrupt the pfn list when doing batch carry
        iommufd: Fix unpinning of pages when an access is present
        iommufd: Check for uptr overflow
      105b64c8
    • Linus Torvalds's avatar
      Merge tag 'pwm/for-6.3-rc6' of... · ae52f797
      Linus Torvalds authored
      Merge tag 'pwm/for-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm fixes from Thierry Reding:
       "These are some fixes to make sure the PWM state structure is always
        initialized to a known state.
      
        Prior to this it could happen in some situations that random data from
        the stack would leak into the data structure and cause subtle bugs"
      
      * tag 'pwm/for-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
        pwm: Zero-initialize the pwm_state passed to driver's .get_state()
        pwm: meson: Explicitly set .polarity in .get_state()
        pwm: sprd: Explicitly set .polarity in .get_state()
        pwm: iqs620a: Explicitly set .polarity in .get_state()
        pwm: cros-ec: Explicitly set .polarity in .get_state()
        pwm: hibvt: Explicitly set .polarity in .get_state()
      ae52f797
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2023-04-06' of git://anongit.freedesktop.org/drm/drm · ac6c0433
      Linus Torvalds authored
      Pull drm fixes from Daniel Vetter:
       "Mostly i915 fixes: dp mst for compression/dsc, perf ioctl uaf, ctx rpm
        accounting, gt reset vs huc loading.
      
        And a few individual driver fixes: ivpu dma fence&suspend, panfrost
        mmap, nouveau color depth"
      
      * tag 'drm-fixes-2023-04-06' of git://anongit.freedesktop.org/drm/drm:
        accel/ivpu: Fix S3 system suspend when not idle
        accel/ivpu: Add dma fence to command buffers only
        drm/i915: Fix context runtime accounting
        drm/i915: fix race condition UAF in i915_perf_add_config_ioctl
        drm/i915: Use compressed bpp when calculating m/n value for DP MST DSC
        drm/i915/huc: Cancel HuC delayed load timer on reset.
        drm/i915/ttm: fix sparse warning
        drm/panfrost: Fix the panfrost_mmu_map_fault_addr() error path
        drm/nouveau/disp: Support more modes by checking with lower bpc
      ac6c0433