Changelog in Linux kernel 6.12.48

 
ALSA: hda/realtek: Fix built-in mic assignment on ASUS VivoBook X515UA [+ + +]
Author: Takashi Iwai <[email protected]>
Date:   Mon Mar 24 16:32:32 2025 +0100

    ALSA: hda/realtek: Fix built-in mic assignment on ASUS VivoBook X515UA
    
    [ Upstream commit 829ee558f3527fd602c6e2e9f270959d1de09fe0 ]
    
    ASUS VivoBook X515UA with PCI SSID 1043:106f had a default quirk
    pickup via pin table that applies ALC256_FIXUP_ASUS_MIC, but this adds
    a bogus built-in mic pin 0x13 enabled.  This was no big problem
    because the pin 0x13 was assigned as the secondary mic, but the recent
    fix made the entries sorted, hence this bogus pin appeared now as the
    primary input and it broke.
    
    For fixing the bug, put the right quirk entry for this device pointing
    to ALC256_FIXUP_ASUS_MIC_NO_PRESENCE.
    
    Fixes: 3b4309546b48 ("ALSA: hda: Fix headset detection failure due to unstable sort")
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=219897
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
bpf: Allow fall back to interpreter for programs with stack size <= 512 [+ + +]
Author: KaFai Wan <[email protected]>
Date:   Tue Sep 9 22:46:14 2025 +0800

    bpf: Allow fall back to interpreter for programs with stack size <= 512
    
    [ Upstream commit df0cb5cb50bd54d3cd4d0d83417ceec6a66404aa ]
    
    OpenWRT users reported regression on ARMv6 devices after updating to latest
    HEAD, where tcpdump filter:
    
    tcpdump "not ether host 3c37121a2b3c and not ether host 184ecbca2a3a \
    and not ether host 14130b4d3f47 and not ether host f0f61cf440b7 \
    and not ether host a84b4dedf471 and not ether host d022be17e1d7 \
    and not ether host 5c497967208b and not ether host 706655784d5b"
    
    fails with warning: "Kernel filter failed: No error information"
    when using config:
     # CONFIG_BPF_JIT_ALWAYS_ON is not set
     CONFIG_BPF_JIT_DEFAULT_ON=y
    
    The issue arises because commits:
    1. "bpf: Fix array bounds error with may_goto" changed default runtime to
       __bpf_prog_ret0_warn when jit_requested = 1
    2. "bpf: Avoid __bpf_prog_ret0_warn when jit fails" returns error when
       jit_requested = 1 but jit fails
    
    This change restores interpreter fallback capability for BPF programs with
    stack size <= 512 bytes when jit fails.
    
    Reported-by: Felix Fietkau <[email protected]>
    Closes: https://lore.kernel.org/bpf/[email protected]/
    Fixes: 6ebc5030e0c5 ("bpf: Fix array bounds error with may_goto")
    Signed-off-by: KaFai Wan <[email protected]>
    Acked-by: Eduard Zingerman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Alexei Starovoitov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

bpf: Fix out-of-bounds dynptr write in bpf_crypto_crypt [+ + +]
Author: Daniel Borkmann <[email protected]>
Date:   Fri Aug 29 16:36:56 2025 +0200

    bpf: Fix out-of-bounds dynptr write in bpf_crypto_crypt
    
    [ Upstream commit f9bb6ffa7f5ad0f8ee0f53fc4a10655872ee4a14 ]
    
    Stanislav reported that in bpf_crypto_crypt() the destination dynptr's
    size is not validated to be at least as large as the source dynptr's
    size before calling into the crypto backend with 'len = src_len'. This
    can result in an OOB write when the destination is smaller than the
    source.
    
    Concretely, in mentioned function, psrc and pdst are both linear
    buffers fetched from each dynptr:
    
      psrc = __bpf_dynptr_data(src, src_len);
      [...]
      pdst = __bpf_dynptr_data_rw(dst, dst_len);
      [...]
      err = decrypt ?
            ctx->type->decrypt(ctx->tfm, psrc, pdst, src_len, piv) :
            ctx->type->encrypt(ctx->tfm, psrc, pdst, src_len, piv);
    
    The crypto backend expects pdst to be large enough with a src_len length
    that can be written. Add an additional src_len > dst_len check and bail
    out if it's the case. Note that these kfuncs are accessible under root
    privileges only.
    
    Fixes: 3e1c6f35409f ("bpf: make common crypto API for TC/XDP programs")
    Reported-by: Stanislav Fort <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Cc: Vadim Fedorenko <[email protected]>
    Reviewed-by: Vadim Fedorenko <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Alexei Starovoitov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

bpf: Tell memcg to use allow_spinning=false path in bpf_timer_init() [+ + +]
Author: Peilin Ye <[email protected]>
Date:   Tue Sep 9 09:52:20 2025 +0000

    bpf: Tell memcg to use allow_spinning=false path in bpf_timer_init()
    
    [ Upstream commit 6d78b4473cdb08b74662355a9e8510bde09c511e ]
    
    Currently, calling bpf_map_kmalloc_node() from __bpf_async_init() can
    cause various locking issues; see the following stack trace (edited for
    style) as one example:
    
    ...
     [10.011566]  do_raw_spin_lock.cold
     [10.011570]  try_to_wake_up             (5) double-acquiring the same
     [10.011575]  kick_pool                      rq_lock, causing a hardlockup
     [10.011579]  __queue_work
     [10.011582]  queue_work_on
     [10.011585]  kernfs_notify
     [10.011589]  cgroup_file_notify
     [10.011593]  try_charge_memcg           (4) memcg accounting raises an
     [10.011597]  obj_cgroup_charge_pages        MEMCG_MAX event
     [10.011599]  obj_cgroup_charge_account
     [10.011600]  __memcg_slab_post_alloc_hook
     [10.011603]  __kmalloc_node_noprof
    ...
     [10.011611]  bpf_map_kmalloc_node
     [10.011612]  __bpf_async_init
     [10.011615]  bpf_timer_init             (3) BPF calls bpf_timer_init()
     [10.011617]  bpf_prog_xxxxxxxxxxxxxxxx_fcg_runnable
     [10.011619]  bpf__sched_ext_ops_runnable
     [10.011620]  enqueue_task_scx           (2) BPF runs with rq_lock held
     [10.011622]  enqueue_task
     [10.011626]  ttwu_do_activate
     [10.011629]  sched_ttwu_pending         (1) grabs rq_lock
    ...
    
    The above was reproduced on bpf-next (b338cf849ec8) by modifying
    ./tools/sched_ext/scx_flatcg.bpf.c to call bpf_timer_init() during
    ops.runnable(), and hacking the memcg accounting code a bit to make
    a bpf_timer_init() call more likely to raise an MEMCG_MAX event.
    
    We have also run into other similar variants (both internally and on
    bpf-next), including double-acquiring cgroup_file_kn_lock, the same
    worker_pool::lock, etc.
    
    As suggested by Shakeel, fix this by using __GFP_HIGH instead of
    GFP_ATOMIC in __bpf_async_init(), so that e.g. if try_charge_memcg()
    raises an MEMCG_MAX event, we call __memcg_memory_event() with
    @allow_spinning=false and avoid calling cgroup_file_notify() there.
    
    Depends on mm patch
    "memcg: skip cgroup_file_notify if spinning is not allowed":
    https://lore.kernel.org/bpf/[email protected]/
    
    v0 approach s/bpf_map_kmalloc_node/bpf_mem_alloc/
    https://lore.kernel.org/bpf/[email protected]/
    v1 approach:
    https://lore.kernel.org/bpf/[email protected]/
    
    Fixes: b00628b1c7d5 ("bpf: Introduce bpf timers.")
    Suggested-by: Shakeel Butt <[email protected]>
    Signed-off-by: Peilin Ye <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Alexei Starovoitov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
btrfs: fix corruption reading compressed range when block size is smaller than page size [+ + +]
Author: Qu Wenruo <[email protected]>
Date:   Sat Sep 13 12:13:53 2025 -0400

    btrfs: fix corruption reading compressed range when block size is smaller than page size
    
    [ Upstream commit 9786531399a679fc2f4630d2c0a186205282ab2f ]
    
    [BUG]
    With 64K page size (aarch64 with 64K page size config) and 4K btrfs
    block size, the following workload can easily lead to a corrupted read:
    
            mkfs.btrfs -f -s 4k $dev > /dev/null
            mount -o compress $dev $mnt
            xfs_io -f -c "pwrite -S 0xff 0 64k" $mnt/base > /dev/null
            echo "correct result:"
            od -Ad -t x1 $mnt/base
            xfs_io -f -c "reflink $mnt/base 32k 0 32k" \
                      -c "reflink $mnt/base 0 32k 32k" \
                      -c "pwrite -S 0xff 60k 4k" $mnt/new > /dev/null
            echo "incorrect result:"
            od -Ad -t x1 $mnt/new
            umount $mnt
    
    This shows the following result:
    
    correct result:
    0000000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    *
    0065536
    incorrect result:
    0000000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    *
    0032768 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    *
    0061440 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    *
    0065536
    
    Notice the zero in the range [32K, 60K), which is incorrect.
    
    [CAUSE]
    With extra trace printk, it shows the following events during od:
    (some unrelated info removed like CPU and context)
    
     od-3457   btrfs_do_readpage: enter r/i=5/258 folio=0(65536) prev_em_start=0000000000000000
    
    The "r/i" is indicating the root and inode number. In our case the file
    "new" is using ino 258 from fs tree (root 5).
    
    Here notice the @prev_em_start pointer is NULL. This means the
    btrfs_do_readpage() is called from btrfs_read_folio(), not from
    btrfs_readahead().
    
     od-3457   btrfs_do_readpage: r/i=5/258 folio=0(65536) cur=0 got em start=0 len=32768
     od-3457   btrfs_do_readpage: r/i=5/258 folio=0(65536) cur=4096 got em start=0 len=32768
     od-3457   btrfs_do_readpage: r/i=5/258 folio=0(65536) cur=8192 got em start=0 len=32768
     od-3457   btrfs_do_readpage: r/i=5/258 folio=0(65536) cur=12288 got em start=0 len=32768
     od-3457   btrfs_do_readpage: r/i=5/258 folio=0(65536) cur=16384 got em start=0 len=32768
     od-3457   btrfs_do_readpage: r/i=5/258 folio=0(65536) cur=20480 got em start=0 len=32768
     od-3457   btrfs_do_readpage: r/i=5/258 folio=0(65536) cur=24576 got em start=0 len=32768
     od-3457   btrfs_do_readpage: r/i=5/258 folio=0(65536) cur=28672 got em start=0 len=32768
    
    These above 32K blocks will be read from the first half of the
    compressed data extent.
    
     od-3457   btrfs_do_readpage: r/i=5/258 folio=0(65536) cur=32768 got em start=32768 len=32768
    
    Note here there is no btrfs_submit_compressed_read() call. Which is
    incorrect now.
    Although both extent maps at 0 and 32K are pointing to the same compressed
    data, their offsets are different thus can not be merged into the same
    read.
    
    So this means the compressed data read merge check is doing something
    wrong.
    
     od-3457   btrfs_do_readpage: r/i=5/258 folio=0(65536) cur=36864 got em start=32768 len=32768
     od-3457   btrfs_do_readpage: r/i=5/258 folio=0(65536) cur=40960 got em start=32768 len=32768
     od-3457   btrfs_do_readpage: r/i=5/258 folio=0(65536) cur=45056 got em start=32768 len=32768
     od-3457   btrfs_do_readpage: r/i=5/258 folio=0(65536) cur=49152 got em start=32768 len=32768
     od-3457   btrfs_do_readpage: r/i=5/258 folio=0(65536) cur=53248 got em start=32768 len=32768
     od-3457   btrfs_do_readpage: r/i=5/258 folio=0(65536) cur=57344 got em start=32768 len=32768
     od-3457   btrfs_do_readpage: r/i=5/258 folio=0(65536) cur=61440 skip uptodate
     od-3457   btrfs_submit_compressed_read: cb orig_bio: file off=0 len=61440
    
    The function btrfs_submit_compressed_read() is only called at the end of
    folio read. The compressed bio will only have an extent map of range [0,
    32K), but the original bio passed in is for the whole 64K folio.
    
    This will cause the decompression part to only fill the first 32K,
    leaving the rest untouched (aka, filled with zero).
    
    This incorrect compressed read merge leads to the above data corruption.
    
    There were similar problems that happened in the past, commit 808f80b46790
    ("Btrfs: update fix for read corruption of compressed and shared
    extents") is doing pretty much the same fix for readahead.
    
    But that's back to 2015, where btrfs still only supports bs (block size)
    == ps (page size) cases.
    This means btrfs_do_readpage() only needs to handle a folio which
    contains exactly one block.
    
    Only btrfs_readahead() can lead to a read covering multiple blocks.
    Thus only btrfs_readahead() passes a non-NULL @prev_em_start pointer.
    
    With v5.15 kernel btrfs introduced bs < ps support. This breaks the above
    assumption that a folio can only contain one block.
    
    Now btrfs_read_folio() can also read multiple blocks in one go.
    But btrfs_read_folio() doesn't pass a @prev_em_start pointer, thus the
    existing bio force submission check will never be triggered.
    
    In theory, this can also happen for btrfs with large folios, but since
    large folio is still experimental, we don't need to bother it, thus only
    bs < ps support is affected for now.
    
    [FIX]
    Instead of passing @prev_em_start to do the proper compressed extent
    check, introduce one new member, btrfs_bio_ctrl::last_em_start, so that
    the existing bio force submission logic will always be triggered.
    
    CC: [email protected] # 5.15+
    Reviewed-by: Filipe Manana <[email protected]>
    Signed-off-by: Qu Wenruo <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    [ Adjust context ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

btrfs: fix squota compressed stats leak [+ + +]
Author: Boris Burkov <[email protected]>
Date:   Wed Aug 20 14:52:05 2025 -0700

    btrfs: fix squota compressed stats leak
    
    commit de134cb54c3a67644ff95b1c9bffe545e752c912 upstream.
    
    The following workload on a squota enabled fs:
    
      btrfs subvol create mnt/subvol
    
      # ensure subvol extents get accounted
      sync
      btrfs qgroup create 1/1 mnt
      btrfs qgroup assign mnt/subvol 1/1 mnt
      btrfs qgroup delete mnt/subvol
    
      # make the cleaner thread run
      btrfs filesystem sync mnt
      sleep 1
      btrfs filesystem sync mnt
      btrfs qgroup destroy 1/1 mnt
    
    will fail with EBUSY. The reason is that 1/1 does the quick accounting
    when we assign subvol to it, gaining its exclusive usage as excl and
    excl_cmpr. But then when we delete subvol, the decrement happens via
    record_squota_delta() which does not update excl_cmpr, as squotas does
    not make any distinction between compressed and normal extents. Thus,
    we increment excl_cmpr but never decrement it, and are unable to delete
    1/1. The two possible fixes are to make squota always mirror excl and
    excl_cmpr or to make the fast accounting separately track the plain and
    cmpr numbers. The latter felt cleaner to me so that is what I opted for.
    
    Fixes: 1e0e9d5771c3 ("btrfs: add helper for recording simple quota deltas")
    CC: [email protected] # 6.12+
    Reviewed-by: Qu Wenruo <[email protected]>
    Signed-off-by: Boris Burkov <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

btrfs: fix subvolume deletion lockup caused by inodes xarray race [+ + +]
Author: Omar Sandoval <[email protected]>
Date:   Tue Aug 26 11:24:38 2025 -0700

    btrfs: fix subvolume deletion lockup caused by inodes xarray race
    
    commit f6a6c280059c4ddc23e12e3de1b01098e240036f upstream.
    
    There is a race condition between inode eviction and inode caching that
    can cause a live struct btrfs_inode to be missing from the root->inodes
    xarray. Specifically, there is a window during evict() between the inode
    being unhashed and deleted from the xarray. If btrfs_iget() is called
    for the same inode in that window, it will be recreated and inserted
    into the xarray, but then eviction will delete the new entry, leaving
    nothing in the xarray:
    
    Thread 1                          Thread 2
    ---------------------------------------------------------------
    evict()
      remove_inode_hash()
                                      btrfs_iget_path()
                                        btrfs_iget_locked()
                                        btrfs_read_locked_inode()
                                          btrfs_add_inode_to_root()
      destroy_inode()
        btrfs_destroy_inode()
          btrfs_del_inode_from_root()
            __xa_erase
    
    In turn, this can cause issues for subvolume deletion. Specifically, if
    an inode is in this lost state, and all other inodes are evicted, then
    btrfs_del_inode_from_root() will call btrfs_add_dead_root() prematurely.
    If the lost inode has a delayed_node attached to it, then when
    btrfs_clean_one_deleted_snapshot() calls btrfs_kill_all_delayed_nodes(),
    it will loop forever because the delayed_nodes xarray will never become
    empty (unless memory pressure forces the inode out). We saw this
    manifest as soft lockups in production.
    
    Fix it by only deleting the xarray entry if it matches the given inode
    (using __xa_cmpxchg()).
    
    Fixes: 310b2f5d5a94 ("btrfs: use an xarray to track open inodes in a root")
    Cc: [email protected] # 6.11+
    Reviewed-by: Josef Bacik <[email protected]>
    Reviewed-by: Filipe Manana <[email protected]>
    Co-authored-by: Leo Martins <[email protected]>
    Signed-off-by: Leo Martins <[email protected]>
    Signed-off-by: Omar Sandoval <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

btrfs: use readahead_expand() on compressed extents [+ + +]
Author: Boris Burkov <[email protected]>
Date:   Sat Sep 13 12:13:52 2025 -0400

    btrfs: use readahead_expand() on compressed extents
    
    [ Upstream commit 9e9ff875e4174be939371667d2cc81244e31232f ]
    
    We recently received a report of poor performance doing sequential
    buffered reads of a file with compressed extents. With bs=128k, a naive
    sequential dd ran as fast on a compressed file as on an uncompressed
    (1.2GB/s on my reproducing system) while with bs<32k, this performance
    tanked down to ~300MB/s.
    
    i.e., slow:
    
      dd if=some-compressed-file of=/dev/null bs=4k count=X
    
    vs fast:
    
      dd if=some-compressed-file of=/dev/null bs=128k count=Y
    
    The cause of this slowness is overhead to do with looking up extent_maps
    to enable readahead pre-caching on compressed extents
    (add_ra_bio_pages()), as well as some overhead in the generic VFS
    readahead code we hit more in the slow case. Notably, the main
    difference between the two read sizes is that in the large sized request
    case, we call btrfs_readahead() relatively rarely while in the smaller
    request we call it for every compressed extent. So the fast case stays
    in the btrfs readahead loop:
    
        while ((folio = readahead_folio(rac)) != NULL)
                btrfs_do_readpage(folio, &em_cached, &bio_ctrl, &prev_em_start);
    
    where the slower one breaks out of that loop every time. This results in
    calling add_ra_bio_pages a lot, doing lots of extent_map lookups,
    extent_map locking, etc.
    
    This happens because although add_ra_bio_pages() does add the
    appropriate un-compressed file pages to the cache, it does not
    communicate back to the ractl in any way. To solve this, we should be
    using readahead_expand() to signal to readahead to expand the readahead
    window.
    
    This change passes the readahead_control into the btrfs_bio_ctrl and in
    the case of compressed reads sets the expansion to the size of the
    extent_map we already looked up anyway. It skips the subpage case as
    that one already doesn't do add_ra_bio_pages().
    
    With this change, whether we use bs=4k or bs=128k, btrfs expands the
    readahead window up to the largest compressed extent we have seen so far
    (in the trivial example: 128k) and the call stacks of the two modes look
    identical. Notably, we barely call add_ra_bio_pages at all. And the
    performance becomes identical as well. So this change certainly "fixes"
    this performance problem.
    
    Of course, it does seem to beg a few questions:
    
    1. Will this waste too much page cache with a too large ra window?
    2. Will this somehow cause bugs prevented by the more thoughtful
       checking in add_ra_bio_pages?
    3. Should we delete add_ra_bio_pages?
    
    My stabs at some answers:
    
    1. Hard to say. See attempts at generic performance testing below. Is
       there a "readahead_shrink" we should be using? Should we expand more
       slowly, by half the remaining em size each time?
    2. I don't think so. Since the new behavior is indistinguishable from
       reading the file with a larger read size passed in, I don't see why
       one would be safe but not the other.
    3. Probably! I tested that and it was fine in fstests, and it seems like
       the pages would get re-used just as well in the readahead case.
       However, it is possible some reads that use page cache but not
       btrfs_readahead() could suffer. I will investigate this further as a
       follow up.
    
    I tested the performance implications of this change in 3 ways (using
    compress-force=zstd:3 for compression):
    
    Directly test the affected workload of small sequential reads on a
    compressed file (improved from ~250MB/s to ~1.2GB/s)
    
    ==========for-next==========
      dd /mnt/lol/non-cmpr 4k
      1048576+0 records in
      1048576+0 records out
      4294967296 bytes (4.3 GB, 4.0 GiB) copied, 6.02983 s, 712 MB/s
      dd /mnt/lol/non-cmpr 128k
      32768+0 records in
      32768+0 records out
      4294967296 bytes (4.3 GB, 4.0 GiB) copied, 5.92403 s, 725 MB/s
      dd /mnt/lol/cmpr 4k
      1048576+0 records in
      1048576+0 records out
      4294967296 bytes (4.3 GB, 4.0 GiB) copied, 17.8832 s, 240 MB/s
      dd /mnt/lol/cmpr 128k
      32768+0 records in
      32768+0 records out
      4294967296 bytes (4.3 GB, 4.0 GiB) copied, 3.71001 s, 1.2 GB/s
    
    ==========ra-expand==========
      dd /mnt/lol/non-cmpr 4k
      1048576+0 records in
      1048576+0 records out
      4294967296 bytes (4.3 GB, 4.0 GiB) copied, 6.09001 s, 705 MB/s
      dd /mnt/lol/non-cmpr 128k
      32768+0 records in
      32768+0 records out
      4294967296 bytes (4.3 GB, 4.0 GiB) copied, 6.07664 s, 707 MB/s
      dd /mnt/lol/cmpr 4k
      1048576+0 records in
      1048576+0 records out
      4294967296 bytes (4.3 GB, 4.0 GiB) copied, 3.79531 s, 1.1 GB/s
      dd /mnt/lol/cmpr 128k
      32768+0 records in
      32768+0 records out
      4294967296 bytes (4.3 GB, 4.0 GiB) copied, 3.69533 s, 1.2 GB/s
    
    Built the linux kernel from clean (no change)
    
    Ran fsperf. Mostly neutral results with some improvements and
    regressions here and there.
    
    Reported-by: Dimitrios Apostolou <[email protected]>
    Link: https://lore.kernel.org/linux-btrfs/[email protected]/
    Reviewed-by: Filipe Manana <[email protected]>
    Signed-off-by: Boris Burkov <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    [ Assert doesn't take a format string ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
can: j1939: j1939_local_ecu_get(): undo increment when j1939_local_ecu_get() fails [+ + +]
Author: Tetsuo Handa <[email protected]>
Date:   Sun Aug 24 19:27:40 2025 +0900

    can: j1939: j1939_local_ecu_get(): undo increment when j1939_local_ecu_get() fails
    
    [ Upstream commit 06e02da29f6f1a45fc07bd60c7eaf172dc21e334 ]
    
    Since j1939_sk_bind() and j1939_sk_release() call j1939_local_ecu_put()
    when J1939_SOCK_BOUND was already set, but the error handling path for
    j1939_sk_bind() will not set J1939_SOCK_BOUND when j1939_local_ecu_get()
    fails, j1939_local_ecu_get() needs to undo priv->ents[sa].nusers++ when
    j1939_local_ecu_get() returns an error.
    
    Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol")
    Signed-off-by: Tetsuo Handa <[email protected]>
    Tested-by: Oleksij Rempel <[email protected]>
    Acked-by: Oleksij Rempel <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Marc Kleine-Budde <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

can: j1939: j1939_sk_bind(): call j1939_priv_put() immediately when j1939_local_ecu_get() failed [+ + +]
Author: Tetsuo Handa <[email protected]>
Date:   Sun Aug 24 19:30:09 2025 +0900

    can: j1939: j1939_sk_bind(): call j1939_priv_put() immediately when j1939_local_ecu_get() failed
    
    [ Upstream commit f214744c8a27c3c1da6b538c232da22cd027530e ]
    
    Commit 25fe97cb7620 ("can: j1939: move j1939_priv_put() into sk_destruct
    callback") expects that a call to j1939_priv_put() can be unconditionally
    delayed until j1939_sk_sock_destruct() is called. But a refcount leak will
    happen when j1939_sk_bind() is called again after j1939_local_ecu_get()
     from previous j1939_sk_bind() call returned an error. We need to call
    j1939_priv_put() before j1939_sk_bind() returns an error.
    
    Fixes: 25fe97cb7620 ("can: j1939: move j1939_priv_put() into sk_destruct callback")
    Signed-off-by: Tetsuo Handa <[email protected]>
    Tested-by: Oleksij Rempel <[email protected]>
    Acked-by: Oleksij Rempel <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Marc Kleine-Budde <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

can: xilinx_can: xcan_write_frame(): fix use-after-free of transmitted SKB [+ + +]
Author: Anssi Hannula <[email protected]>
Date:   Fri Aug 22 12:50:02 2025 +0300

    can: xilinx_can: xcan_write_frame(): fix use-after-free of transmitted SKB
    
    [ Upstream commit ef79f00be72bd81d2e1e6f060d83cf7e425deee4 ]
    
    can_put_echo_skb() takes ownership of the SKB and it may be freed
    during or after the call.
    
    However, xilinx_can xcan_write_frame() keeps using SKB after the call.
    
    Fix that by only calling can_put_echo_skb() after the code is done
    touching the SKB.
    
    The tx_lock is held for the entire xcan_write_frame() execution and
    also on the can_get_echo_skb() side so the order of operations does not
    matter.
    
    An earlier fix commit 3d3c817c3a40 ("can: xilinx_can: Fix usage of skb
    memory") did not move the can_put_echo_skb() call far enough.
    
    Signed-off-by: Anssi Hannula <[email protected]>
    Fixes: 1598efe57b3e ("can: xilinx_can: refactor code in preparation for CAN FD support")
    Link: https://patch.msgid.link/[email protected]
    [mkl: add "commit" in front of sha1 in patch description]
    [mkl: fix indention]
    Signed-off-by: Marc Kleine-Budde <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
ceph: fix race condition validating r_parent before applying state [+ + +]
Author: Alex Markuze <[email protected]>
Date:   Tue Aug 12 09:57:38 2025 +0000

    ceph: fix race condition validating r_parent before applying state
    
    commit 15f519e9f883b316d86e2bb6b767a023aafd9d83 upstream.
    
    Add validation to ensure the cached parent directory inode matches the
    directory info in MDS replies. This prevents client-side race conditions
    where concurrent operations (e.g. rename) cause r_parent to become stale
    between request initiation and reply processing, which could lead to
    applying state changes to incorrect directory inodes.
    
    [ idryomov: folded a kerneldoc fixup and a follow-up fix from Alex to
      move CEPH_CAP_PIN reference when r_parent is updated:
    
      When the parent directory lock is not held, req->r_parent can become
      stale and is updated to point to the correct inode.  However, the
      associated CEPH_CAP_PIN reference was not being adjusted.  The
      CEPH_CAP_PIN is a reference on an inode that is tracked for
      accounting purposes.  Moving this pin is important to keep the
      accounting balanced. When the pin was not moved from the old parent
      to the new one, it created two problems: The reference on the old,
      stale parent was never released, causing a reference leak.
      A reference for the new parent was never acquired, creating the risk
      of a reference underflow later in ceph_mdsc_release_request().  This
      patch corrects the logic by releasing the pin from the old parent and
      acquiring it for the new parent when r_parent is switched.  This
      ensures reference accounting stays balanced. ]
    
    Cc: [email protected]
    Signed-off-by: Alex Markuze <[email protected]>
    Reviewed-by: Viacheslav Dubeyko <[email protected]>
    Signed-off-by: Ilya Dryomov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

ceph: fix race condition where r_parent becomes stale before sending message [+ + +]
Author: Alex Markuze <[email protected]>
Date:   Tue Aug 12 09:57:39 2025 +0000

    ceph: fix race condition where r_parent becomes stale before sending message
    
    commit bec324f33d1ed346394b2eee25bf6dbf3511f727 upstream.
    
    When the parent directory's i_rwsem is not locked, req->r_parent may become
    stale due to concurrent operations (e.g. rename) between dentry lookup and
    message creation. Validate that r_parent matches the encoded parent inode
    and update to the correct inode if a mismatch is detected.
    
    [ idryomov: folded a follow-up fix from Alex to drop extra reference
      from ceph_get_reply_dir() in ceph_fill_trace():
    
      ceph_get_reply_dir() may return a different, referenced inode when
      r_parent is stale and the parent directory lock is not held.
      ceph_fill_trace() used that inode but failed to drop the reference
      when it differed from req->r_parent, leaking an inode reference.
    
      Keep the directory inode in a local variable and iput() it at
      function end if it does not match req->r_parent. ]
    
    Cc: [email protected]
    Signed-off-by: Alex Markuze <[email protected]>
    Reviewed-by: Viacheslav Dubeyko <[email protected]>
    Signed-off-by: Ilya Dryomov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
compiler-clang.h: define __SANITIZE_*__ macros only when undefined [+ + +]
Author: Nathan Chancellor <[email protected]>
Date:   Tue Sep 2 15:49:26 2025 -0700

    compiler-clang.h: define __SANITIZE_*__ macros only when undefined
    
    commit 3fac212fe489aa0dbe8d80a42a7809840ca7b0f9 upstream.
    
    Clang 22 recently added support for defining __SANITIZE__ macros similar
    to GCC [1], which causes warnings (or errors with CONFIG_WERROR=y or W=e)
    with the existing defines that the kernel creates to emulate this behavior
    with existing clang versions.
    
      In file included from <built-in>:3:
      In file included from include/linux/compiler_types.h:171:
      include/linux/compiler-clang.h:37:9: error: '__SANITIZE_THREAD__' macro redefined [-Werror,-Wmacro-redefined]
         37 | #define __SANITIZE_THREAD__
            |         ^
      <built-in>:352:9: note: previous definition is here
        352 | #define __SANITIZE_THREAD__ 1
            |         ^
    
    Refactor compiler-clang.h to only define the sanitizer macros when they
    are undefined and adjust the rest of the code to use these macros for
    checking if the sanitizers are enabled, clearing up the warnings and
    allowing the kernel to easily drop these defines when the minimum
    supported version of LLVM for building the kernel becomes 22.0.0 or newer.
    
    Link: https://lkml.kernel.org/r/20250902-clang-update-sanitize-defines-v1-1-cf3702ca3d92@kernel.org
    Link: https://github.com/llvm/llvm-project/commit/568c23bbd3303518c5056d7f03444dae4fdc8a9c [1]
    Signed-off-by: Nathan Chancellor <[email protected]>
    Reviewed-by: Justin Stitt <[email protected]>
    Cc: Alexander Potapenko <[email protected]>
    Cc: Andrey Konovalov <[email protected]>
    Cc: Andrey Ryabinin <[email protected]>
    Cc: Bill Wendling <[email protected]>
    Cc: Dmitriy Vyukov <[email protected]>
    Cc: Marco Elver <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
Linux: Disable SLUB_TINY for build testing [+ + +]
Author: Linus Torvalds <[email protected]>
Date:   Sun Apr 6 10:00:04 2025 -0700

    Disable SLUB_TINY for build testing
    
    [ Upstream commit 6f110a5e4f9977c31ce76fefbfef6fd4eab6bfb7 ]
    
    ... and don't error out so hard on missing module descriptions.
    
    Before commit 6c6c1fc09de3 ("modpost: require a MODULE_DESCRIPTION()")
    we used to warn about missing module descriptions, but only when
    building with extra warnigns (ie 'W=1').
    
    After that commit the warning became an unconditional hard error.
    
    And it turns out not all modules have been converted despite the claims
    to the contrary.  As reported by Damian Tometzki, the slub KUnit test
    didn't have a module description, and apparently nobody ever really
    noticed.
    
    The reason nobody noticed seems to be that the slub KUnit tests get
    disabled by SLUB_TINY, which also ends up disabling a lot of other code,
    both in tests and in slub itself.  And so anybody doing full build tests
    didn't actually see this failre.
    
    So let's disable SLUB_TINY for build-only tests, since it clearly ends
    up limiting build coverage.  Also turn the missing module descriptions
    error back into a warning, but let's keep it around for non-'W=1'
    builds.
    
    Reported-by: Damian Tometzki <[email protected]>
    Link: https://lore.kernel.org/all/01070196099fd059-e8463438-7b1b-4ec8-816d-173874be9966-000000@eu-central-1.amazonses.com/
    Cc: Masahiro Yamada <[email protected]>
    Cc: Jeff Johnson <[email protected]>
    Fixes: 6c6c1fc09de3 ("modpost: require a MODULE_DESCRIPTION()")
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
dma-debug: don't enforce dma mapping check on noncoherent allocations [+ + +]
Author: Baochen Qiang <[email protected]>
Date:   Thu Aug 28 16:17:33 2025 +0800

    dma-debug: don't enforce dma mapping check on noncoherent allocations
    
    [ Upstream commit 7e2368a21741e2db542330b32aa6fdd8908e7cff ]
    
    As discussed in [1], there is no need to enforce dma mapping check on
    noncoherent allocations, a simple test on the returned CPU address is
    good enough.
    
    Add a new pair of debug helpers and use them for noncoherent alloc/free
    to fix this issue.
    
    Fixes: efa70f2fdc84 ("dma-mapping: add a new dma_alloc_pages API")
    Link: https://lore.kernel.org/all/[email protected] # 1
    Signed-off-by: Baochen Qiang <[email protected]>
    Signed-off-by: Marek Szyprowski <[email protected]>
    Link: https://lore.kernel.org/r/20250828-dma-debug-fix-noncoherent-dma-check-v1-1-76e9be0dd7fc@oss.qualcomm.com
    Signed-off-by: Sasha Levin <[email protected]>

dma-debug: fix physical address calculation for struct dma_debug_entry [+ + +]
Author: Fedor Pchelkin <[email protected]>
Date:   Wed Nov 27 21:59:26 2024 +0300

    dma-debug: fix physical address calculation for struct dma_debug_entry
    
    [ Upstream commit aef7ee7649e02f7fc0d2e5e532f352496976dcb1 ]
    
    Offset into the page should also be considered while calculating a physical
    address for struct dma_debug_entry. page_to_phys() just shifts the value
    PAGE_SHIFT bits to the left so offset part is zero-filled.
    
    An example (wrong) debug assertion failure with CONFIG_DMA_API_DEBUG
    enabled which is observed during systemd boot process after recent
    dma-debug changes:
    
    DMA-API: e1000 0000:00:03.0: cacheline tracking EEXIST, overlapping mappings aren't supported
    WARNING: CPU: 4 PID: 941 at kernel/dma/debug.c:596 add_dma_entry
    CPU: 4 UID: 0 PID: 941 Comm: ip Not tainted 6.12.0+ #288
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
    RIP: 0010:add_dma_entry kernel/dma/debug.c:596
    Call Trace:
     <TASK>
    debug_dma_map_page kernel/dma/debug.c:1236
    dma_map_page_attrs kernel/dma/mapping.c:179
    e1000_alloc_rx_buffers drivers/net/ethernet/intel/e1000/e1000_main.c:4616
    ...
    
    Found by Linux Verification Center (linuxtesting.org).
    
    Fixes: 9d4f645a1fd4 ("dma-debug: store a phys_addr_t in struct dma_debug_entry")
    Signed-off-by: Fedor Pchelkin <[email protected]>
    [hch: added a little helper to clean up the code]
    Signed-off-by: Christoph Hellwig <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

dma-debug: store a phys_addr_t in struct dma_debug_entry [+ + +]
Author: Christoph Hellwig <[email protected]>
Date:   Sun Oct 6 09:20:01 2024 +0200

    dma-debug: store a phys_addr_t in struct dma_debug_entry
    
    [ Upstream commit 9d4f645a1fd49eea70a21e8671d358ebe1c08d02 ]
    
    dma-debug goes to great length to split incoming physical addresses into
    a PFN and offset to store them in struct dma_debug_entry, just to
    recombine those for all meaningful uses.  Just store a phys_addr_t
    instead.
    
    Signed-off-by: Christoph Hellwig <[email protected]>
    Stable-dep-of: 7e2368a21741 ("dma-debug: don't enforce dma mapping check on noncoherent allocations")
    Signed-off-by: Sasha Levin <[email protected]>

 
dma-mapping: fix swapped dir/flags arguments to trace_dma_alloc_sgt_err [+ + +]
Author: Sean Anderson <[email protected]>
Date:   Thu Oct 31 11:45:14 2024 -0400

    dma-mapping: fix swapped dir/flags arguments to trace_dma_alloc_sgt_err
    
    [ Upstream commit d5bbfbad58ec0ccd187282f0e171bc763efa6828 ]
    
    trace_dma_alloc_sgt_err was called with the dir and flags arguments
    swapped. Fix this.
    
    Fixes: 68b6dbf1f441 ("dma-mapping: trace more error paths")
    Signed-off-by: Sean Anderson <[email protected]>
    Reported-by: kernel test robot <[email protected]>
    Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
    Signed-off-by: Christoph Hellwig <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

dma-mapping: trace dma_alloc/free direction [+ + +]
Author: Sean Anderson <[email protected]>
Date:   Fri Oct 18 11:00:35 2024 -0400

    dma-mapping: trace dma_alloc/free direction
    
    [ Upstream commit 3afff779a725cba914e6caba360b696ae6f90249 ]
    
    In preparation for using these tracepoints in a few more places, trace
    the DMA direction as well. For coherent allocations this is always
    bidirectional.
    
    Signed-off-by: Sean Anderson <[email protected]>
    Reviewed-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Christoph Hellwig <[email protected]>
    Stable-dep-of: 7e2368a21741 ("dma-debug: don't enforce dma mapping check on noncoherent allocations")
    Signed-off-by: Sasha Levin <[email protected]>

dma-mapping: trace more error paths [+ + +]
Author: Sean Anderson <[email protected]>
Date:   Fri Oct 18 11:00:37 2024 -0400

    dma-mapping: trace more error paths
    
    [ Upstream commit 68b6dbf1f441c4eba3b8511728a41cf9b01dca35 ]
    
    It can be surprising to the user if DMA functions are only traced on
    success. On failure, it can be unclear what the source of the problem
    is. Fix this by tracing all functions even when they fail. Cases where
    we BUG/WARN are skipped, since those should be sufficiently noisy
    already.
    
    Signed-off-by: Sean Anderson <[email protected]>
    Reviewed-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Christoph Hellwig <[email protected]>
    Stable-dep-of: 7e2368a21741 ("dma-debug: don't enforce dma mapping check on noncoherent allocations")
    Signed-off-by: Sasha Levin <[email protected]>

dma-mapping: use trace_dma_alloc for dma_alloc* instead of using trace_dma_map [+ + +]
Author: Sean Anderson <[email protected]>
Date:   Fri Oct 18 11:00:36 2024 -0400

    dma-mapping: use trace_dma_alloc for dma_alloc* instead of using trace_dma_map
    
    [ Upstream commit c4484ab86ee00f2d9236e2851621ea02c105f4cc ]
    
    In some cases, we use trace_dma_map to trace dma_alloc* functions. This
    generally follows dma_debug. However, this does not record all of the
    relevant information for allocations, such as GFP flags. Create new
    dma_alloc tracepoints for these functions. Note that while
    dma_alloc_noncontiguous may allocate discontiguous pages (from the CPU's
    point of view), the device will only see one contiguous mapping.
    Therefore, we just need to trace dma_addr and size.
    
    Signed-off-by: Sean Anderson <[email protected]>
    Reviewed-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Christoph Hellwig <[email protected]>
    Stable-dep-of: 7e2368a21741 ("dma-debug: don't enforce dma mapping check on noncoherent allocations")
    Signed-off-by: Sasha Levin <[email protected]>

 
dmaengine: dw: dmamux: Fix device reference leak in rzn1_dmamux_route_allocate [+ + +]
Author: Miaoqian Lin <[email protected]>
Date:   Tue Sep 2 17:03:58 2025 +0800

    dmaengine: dw: dmamux: Fix device reference leak in rzn1_dmamux_route_allocate
    
    commit aa2e1e4563d3ab689ffa86ca1412ecbf9fd3b308 upstream.
    
    The reference taken by of_find_device_by_node()
    must be released when not needed anymore.
    Add missing put_device() call to fix device reference leaks.
    
    Fixes: 134d9c52fca2 ("dmaengine: dw: dmamux: Introduce RZN1 DMA router support")
    Cc: [email protected]
    Signed-off-by: Miaoqian Lin <[email protected]>
    Reviewed-by: Miquel Raynal <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

dmaengine: idxd: Fix double free in idxd_setup_wqs() [+ + +]
Author: Dan Carpenter <[email protected]>
Date:   Mon Aug 11 13:43:39 2025 +0300

    dmaengine: idxd: Fix double free in idxd_setup_wqs()
    
    [ Upstream commit 39aaa337449e71a41d4813be0226a722827ba606 ]
    
    The clean up in idxd_setup_wqs() has had a couple bugs because the error
    handling is a bit subtle.  It's simpler to just re-write it in a cleaner
    way.  The issues here are:
    
    1) If "idxd->max_wqs" is <= 0 then we call put_device(conf_dev) when
       "conf_dev" hasn't been initialized.
    2) If kzalloc_node() fails then again "conf_dev" is invalid.  It's
       either uninitialized or it points to the "conf_dev" from the
       previous iteration so it leads to a double free.
    
    It's better to free partial loop iterations within the loop and then
    the unwinding at the end can handle whole loop iterations.  I also
    renamed the labels to describe what the goto does and not where the goto
    was located.
    
    Fixes: 3fd2f4bc010c ("dmaengine: idxd: fix memory leak in error handling path of idxd_setup_wqs")
    Reported-by: Colin Ian King <[email protected]>
    Closes: https://lore.kernel.org/all/[email protected]/
    Signed-off-by: Dan Carpenter <[email protected]>
    Reviewed-by: Dave Jiang <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

dmaengine: idxd: Fix refcount underflow on module unload [+ + +]
Author: Yi Sun <[email protected]>
Date:   Tue Jul 29 23:03:13 2025 +0800

    dmaengine: idxd: Fix refcount underflow on module unload
    
    [ Upstream commit b7cb9a034305d52222433fad10c3de10204f29e7 ]
    
    A recent refactor introduced a misplaced put_device() call, resulting in a
    reference count underflow during module unload.
    
    There is no need to add additional put_device() calls for idxd groups,
    engines, or workqueues. Although the commit claims: "Note, this also
    fixes the missing put_device() for idxd groups, engines, and wqs."
    
    It appears no such omission actually existed. The required cleanup is
    already handled by the call chain:
    idxd_unregister_devices() -> device_unregister() -> put_device()
    
    Extend idxd_cleanup() to handle the remaining necessary cleanup and
    remove idxd_cleanup_internals(), which duplicates deallocation logic
    for idxd, engines, groups, and workqueues. Memory management is also
    properly handled through the Linux device model.
    
    Fixes: a409e919ca32 ("dmaengine: idxd: Refactor remove call with idxd_cleanup() helper")
    Signed-off-by: Yi Sun <[email protected]>
    Tested-by: Shuai Xue <[email protected]>
    Reviewed-by: Dave Jiang <[email protected]>
    Acked-by: Vinicius Costa Gomes <[email protected]>
    
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

dmaengine: idxd: Remove improper idxd_free [+ + +]
Author: Yi Sun <[email protected]>
Date:   Tue Jul 29 23:03:12 2025 +0800

    dmaengine: idxd: Remove improper idxd_free
    
    [ Upstream commit f41c538881eec4dcf5961a242097d447f848cda6 ]
    
    The call to idxd_free() introduces a duplicate put_device() leading to a
    reference count underflow:
    refcount_t: underflow; use-after-free.
    WARNING: CPU: 15 PID: 4428 at lib/refcount.c:28 refcount_warn_saturate+0xbe/0x110
    ...
    Call Trace:
     <TASK>
      idxd_remove+0xe4/0x120 [idxd]
      pci_device_remove+0x3f/0xb0
      device_release_driver_internal+0x197/0x200
      driver_detach+0x48/0x90
      bus_remove_driver+0x74/0xf0
      pci_unregister_driver+0x2e/0xb0
      idxd_exit_module+0x34/0x7a0 [idxd]
      __do_sys_delete_module.constprop.0+0x183/0x280
      do_syscall_64+0x54/0xd70
      entry_SYSCALL_64_after_hwframe+0x76/0x7e
    
    The idxd_unregister_devices() which is invoked at the very beginning of
    idxd_remove(), already takes care of the necessary put_device() through the
    following call path:
    idxd_unregister_devices() -> device_unregister() -> put_device()
    
    In addition, when CONFIG_DEBUG_KOBJECT_RELEASE is enabled, put_device() may
    trigger asynchronous cleanup via schedule_delayed_work(). If idxd_free() is
    called immediately after, it can result in a use-after-free.
    
    Remove the improper idxd_free() to avoid both the refcount underflow and
    potential memory corruption during module unload.
    
    Fixes: d5449ff1b04d ("dmaengine: idxd: Add missing idxd cleanup to fix memory leak in remove call")
    Signed-off-by: Yi Sun <[email protected]>
    Tested-by: Shuai Xue <[email protected]>
    Reviewed-by: Dave Jiang <[email protected]>
    Acked-by: Vinicius Costa Gomes <[email protected]>
    
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

dmaengine: qcom: bam_dma: Fix DT error handling for num-channels/ees [+ + +]
Author: Stephan Gerhold <[email protected]>
Date:   Wed Feb 12 18:03:54 2025 +0100

    dmaengine: qcom: bam_dma: Fix DT error handling for num-channels/ees
    
    commit 5068b5254812433e841a40886e695633148d362d upstream.
    
    When we don't have a clock specified in the device tree, we have no way to
    ensure the BAM is on. This is often the case for remotely-controlled or
    remotely-powered BAM instances. In this case, we need to read num-channels
    from the DT to have all the necessary information to complete probing.
    
    However, at the moment invalid device trees without clock and without
    num-channels still continue probing, because the error handling is missing
    return statements. The driver will then later try to read the number of
    channels from the registers. This is unsafe, because it relies on boot
    firmware and lucky timing to succeed. Unfortunately, the lack of proper
    error handling here has been abused for several Qualcomm SoCs upstream,
    causing early boot crashes in several situations [1, 2].
    
    Avoid these early crashes by erroring out when any of the required DT
    properties are missing. Note that this will break some of the existing DTs
    upstream (mainly BAM instances related to the crypto engine). However,
    clearly these DTs have never been tested properly, since the error in the
    kernel log was just ignored. It's safer to disable the crypto engine for
    these broken DTBs.
    
    [1]: https://lore.kernel.org/r/[email protected]/
    [2]: https://lore.kernel.org/r/[email protected]/
    
    Cc: [email protected]
    Fixes: 48d163b1aa6e ("dmaengine: qcom: bam_dma: get num-channels and num-ees from dt")
    Signed-off-by: Stephan Gerhold <[email protected]>
    Reviewed-by: Konrad Dybcio <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

dmaengine: ti: edma: Fix memory allocation size for queue_priority_map [+ + +]
Author: Anders Roxell <[email protected]>
Date:   Sat Aug 30 11:49:53 2025 +0200

    dmaengine: ti: edma: Fix memory allocation size for queue_priority_map
    
    [ Upstream commit e63419dbf2ceb083c1651852209c7f048089ac0f ]
    
    Fix a critical memory allocation bug in edma_setup_from_hw() where
    queue_priority_map was allocated with insufficient memory. The code
    declared queue_priority_map as s8 (*)[2] (pointer to array of 2 s8),
    but allocated memory using sizeof(s8) instead of the correct size.
    
    This caused out-of-bounds memory writes when accessing:
      queue_priority_map[i][0] = i;
      queue_priority_map[i][1] = i;
    
    The bug manifested as kernel crashes with "Oops - undefined instruction"
    on ARM platforms (BeagleBoard-X15) during EDMA driver probe, as the
    memory corruption triggered kernel hardening features on Clang.
    
    Change the allocation to use sizeof(*queue_priority_map) which
    automatically gets the correct size for the 2D array structure.
    
    Fixes: 2b6b3b742019 ("ARM/dmaengine: edma: Merge the two drivers under drivers/dma/")
    Signed-off-by: Anders Roxell <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
docs: networking: can: change bcm_msg_head frames member to support flexible array [+ + +]
Author: Alex Tran <[email protected]>
Date:   Wed Sep 3 20:17:09 2025 -0700

    docs: networking: can: change bcm_msg_head frames member to support flexible array
    
    [ Upstream commit 641427d5bf90af0625081bf27555418b101274cd ]
    
    The documentation of the 'bcm_msg_head' struct does not match how
    it is defined in 'bcm.h'. Changed the frames member to a flexible array,
    matching the definition in the header file.
    
    See commit 94dfc73e7cf4 ("treewide: uapi: Replace zero-length arrays with
    flexible-array members")
    
    Signed-off-by: Alex Tran <[email protected]>
    Acked-by: Oliver Hartkopp <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Fixes: 94dfc73e7cf4 ("treewide: uapi: Replace zero-length arrays with flexible-array members")
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=217783
    Signed-off-by: Marc Kleine-Budde <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
drm/amd/display: Fix error pointers in amdgpu_dm_crtc_mem_type_changed [+ + +]
Author: Srinivasan Shanmugam <[email protected]>
Date:   Wed Jan 15 22:29:06 2025 +0530

    drm/amd/display: Fix error pointers in amdgpu_dm_crtc_mem_type_changed
    
    [ Upstream commit da29abe71e164f10917ea6da02f5d9c192ccdeb7 ]
    
    The function amdgpu_dm_crtc_mem_type_changed was dereferencing pointers
    returned by drm_atomic_get_plane_state without checking for errors. This
    could lead to undefined behavior if the function returns an error pointer.
    
    This commit adds checks using IS_ERR to ensure that new_plane_state and
    old_plane_state are valid before dereferencing them.
    
    Fixes the below:
    
    drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:11486 amdgpu_dm_crtc_mem_type_changed()
    error: 'new_plane_state' dereferencing possible ERR_PTR()
    
    drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
        11475 static bool amdgpu_dm_crtc_mem_type_changed(struct drm_device *dev,
        11476                                             struct drm_atomic_state *state,
        11477                                             struct drm_crtc_state *crtc_state)
        11478 {
        11479         struct drm_plane *plane;
        11480         struct drm_plane_state *new_plane_state, *old_plane_state;
        11481
        11482         drm_for_each_plane_mask(plane, dev, crtc_state->plane_mask) {
        11483                 new_plane_state = drm_atomic_get_plane_state(state, plane);
        11484                 old_plane_state = drm_atomic_get_plane_state(state, plane);
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^ These functions can fail.
    
        11485
    --> 11486                 if (old_plane_state->fb && new_plane_state->fb &&
        11487                     get_mem_type(old_plane_state->fb) != get_mem_type(new_plane_state->fb))
        11488                         return true;
        11489         }
        11490
        11491         return false;
        11492 }
    
    Fixes: 4caacd1671b7 ("drm/amd/display: Do not elevate mem_type change to full update")
    Cc: Leo Li <[email protected]>
    Cc: Tom Chung <[email protected]>
    Cc: Rodrigo Siqueira <[email protected]>
    Cc: Roman Li <[email protected]>
    Cc: Alex Hung <[email protected]>
    Cc: Aurabindo Pillai <[email protected]>
    Cc: Harry Wentland <[email protected]>
    Cc: Hamza Mahfooz <[email protected]>
    Reported-by: Dan Carpenter <[email protected]>
    Signed-off-by: Srinivasan Shanmugam <[email protected]>
    Reviewed-by: Roman Li <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

drm/amd/display: use udelay rather than fsleep [+ + +]
Author: Alex Deucher <[email protected]>
Date:   Wed Sep 3 09:11:12 2025 -0400

    drm/amd/display: use udelay rather than fsleep
    
    [ Upstream commit 1d66c3f2b8c0b5c51f3f4fe29b362c9851190c5a ]
    
    This function can be called from an atomic context so we can't use
    fsleep().
    
    Fixes: 01f60348d8fb ("drm/amd/display: Fix 'failed to blank crtc!'")
    Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4549
    Cc: Wen Chen <[email protected]>
    Cc: Fangzhi Zuo <[email protected]>
    Cc: Nicholas Kazlauskas <[email protected]>
    Cc: Harry Wentland <[email protected]>
    Reviewed-by: Harry Wentland <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 27e4dc2c0543fd1808cc52bd888ee1e0533c4a2e)
    Signed-off-by: Sasha Levin <[email protected]>

 
drm/amdgpu/vcn4: Fix IB parsing with multiple engine info packages [+ + +]
Author: David Rosca <[email protected]>
Date:   Mon Aug 18 09:06:58 2025 +0200

    drm/amdgpu/vcn4: Fix IB parsing with multiple engine info packages
    
    commit 2b10cb58d7a3fd621ec9b2ba765a092e562ef998 upstream.
    
    There can be multiple engine info packages in one IB and the first one
    may be common engine, not decode/encode.
    We need to parse the entire IB instead of stopping after finding first
    engine info.
    
    Signed-off-by: David Rosca <[email protected]>
    Reviewed-by: Leo Liu <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit dc8f9f0f45166a6b37864e7a031c726981d6e5fc)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/amdgpu/vcn: Allow limiting ctx to instance 0 for AV1 at any time [+ + +]
Author: David Rosca <[email protected]>
Date:   Mon Aug 18 09:18:37 2025 +0200

    drm/amdgpu/vcn: Allow limiting ctx to instance 0 for AV1 at any time
    
    commit 3318f2d20ce48849855df5e190813826d0bc3653 upstream.
    
    There is no reason to require this to happen on first submitted IB only.
    We need to wait for the queue to be idle, but it can be done at any
    time (including when there are multiple video sessions active).
    
    Signed-off-by: David Rosca <[email protected]>
    Reviewed-by: Leo Liu <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 8908fdce0634a623404e9923ed2f536101a39db5)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/amdgpu: Add back JPEG to video caps for carrizo and newer [+ + +]
Author: David Rosca <[email protected]>
Date:   Mon Apr 7 13:12:11 2025 +0200

    drm/amdgpu: Add back JPEG to video caps for carrizo and newer
    
    [ Upstream commit 2036be31741b00f030530381643a8b35a5a42b5c ]
    
    JPEG is not supported on Vega only.
    
    Fixes: 0a6e7b06bdbe ("drm/amdgpu: Remove JPEG from vega and carrizo video caps")
    Signed-off-by: David Rosca <[email protected]>
    Reviewed-by: Leo Liu <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 0f4dfe86fe922c37bcec99dce80a15b4d5d4726d)
    Cc: [email protected]
    Signed-off-by: Sasha Levin <[email protected]>

drm/amdgpu: fix a memory leak in fence cleanup when unloading [+ + +]
Author: Alex Deucher <[email protected]>
Date:   Thu Sep 4 12:35:05 2025 -0400

    drm/amdgpu: fix a memory leak in fence cleanup when unloading
    
    commit 7838fb5f119191403560eca2e23613380c0e425e upstream.
    
    Commit b61badd20b44 ("drm/amdgpu: fix usage slab after free")
    reordered when amdgpu_fence_driver_sw_fini() was called after
    that patch, amdgpu_fence_driver_sw_fini() effectively became
    a no-op as the sched entities we never freed because the
    ring pointers were already set to NULL.  Remove the NULL
    setting.
    
    Reported-by: Lin.Cao <[email protected]>
    Cc: Vitaly Prosyak <[email protected]>
    Cc: Christian König <[email protected]>
    Fixes: b61badd20b44 ("drm/amdgpu: fix usage slab after free")
    Reviewed-by: Christian König <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit a525fa37aac36c4591cc8b07ae8957862415fbd5)
    Cc: [email protected]
    [ Adapt to conditional check ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/i915/pmu: Fix zero delta busyness issue [+ + +]
Author: Umesh Nerlige Ramappa <[email protected]>
Date:   Thu Jan 23 11:38:39 2025 -0800

    drm/i915/pmu: Fix zero delta busyness issue
    
    [ Upstream commit cb5fab2afd906307876d79537ef0329033c40dd3 ]
    
    When running igt@gem_exec_balancer@individual for multiple iterations,
    it is seen that the delta busyness returned by PMU is 0. The issue stems
    from a combination of 2 implementation specific details:
    
    1) gt_park is throttling __update_guc_busyness_stats() so that it does
    not hog PCI bandwidth for some use cases. (Ref: 59bcdb564b3ba)
    
    2) busyness implementation always returns monotonically increasing
    counters. (Ref: cf907f6d29421)
    
    If an application queried an engine while it was active,
    engine->stats.guc.running is set to true. Following that, if all PM
    wakeref's are released, then gt is parked. At this time the throttling
    of __update_guc_busyness_stats() may result in a missed update to the
    running state of the engine (due to (1) above). This means subsequent
    calls to guc_engine_busyness() will think that the engine is still
    running and they will keep updating the cached counter (stats->total).
    This results in an inflated cached counter.
    
    Later when the application runs a workload and queries for busyness, we
    return the cached value since it is larger than the actual value (due to
    (2) above)
    
    All subsequent queries will return the same large (inflated) value, so
    the application sees a delta busyness of zero.
    
    Fix the issue by resetting the running state of engines each time
    intel_guc_busyness_park() is called.
    
    v2: (Rodrigo)
    - Use the correct tag in commit message
    - Drop the redundant wakeref check in guc_engine_busyness() and update
      commit message
    
    Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13366
    Fixes: cf907f6d2942 ("i915/guc: Ensure busyness counter increases motonically")
    Signed-off-by: Umesh Nerlige Ramappa <[email protected]>
    Reviewed-by: Rodrigo Vivi <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit 431b742e2bfc9f6dd713f261629741980996d001)
    Signed-off-by: Rodrigo Vivi <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
drm/i915/power: fix size for for_each_set_bit() in abox iteration [+ + +]
Author: Jani Nikula <[email protected]>
Date:   Fri Sep 5 13:41:49 2025 +0300

    drm/i915/power: fix size for for_each_set_bit() in abox iteration
    
    commit cfa7b7659757f8d0fc4914429efa90d0d2577dd7 upstream.
    
    for_each_set_bit() expects size to be in bits, not bytes. The abox mask
    iteration uses bytes, but it works by coincidence, because the local
    variable holding the mask is unsigned long, and the mask only ever has
    bit 2 as the highest bit. Using a smaller type could lead to subtle and
    very hard to track bugs.
    
    Fixes: 62afef2811e4 ("drm/i915/rkl: RKL uses ABOX0 for pixel transfers")
    Cc: Ville Syrjälä <[email protected]>
    Cc: Matt Roper <[email protected]>
    Cc: [email protected] # v5.9+
    Reviewed-by: Matt Roper <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jani Nikula <[email protected]>
    (cherry picked from commit 7ea3baa6efe4bb93d11e1c0e6528b1468d7debf6)
    Signed-off-by: Tvrtko Ursulin <[email protected]>
    [ adapted struct intel_display *display parameters to struct drm_i915_private *dev_priv ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/mediatek: fix potential OF node use-after-free [+ + +]
Author: Johan Hovold <[email protected]>
Date:   Fri Aug 29 11:03:44 2025 +0200

    drm/mediatek: fix potential OF node use-after-free
    
    commit 4de37a48b6b58faaded9eb765047cf0d8785ea18 upstream.
    
    The for_each_child_of_node() helper drops the reference it takes to each
    node as it iterates over children and an explicit of_node_put() is only
    needed when exiting the loop early.
    
    Drop the recently introduced bogus additional reference count decrement
    at each iteration that could potentially lead to a use-after-free.
    
    Fixes: 1f403699c40f ("drm/mediatek: Fix device/node reference count leaks in mtk_drm_get_all_drm_priv")
    Cc: Ma Ke <[email protected]>
    Cc: [email protected]
    Signed-off-by: Johan Hovold <[email protected]>
    Reviewed-by: CK Hu <[email protected]>
    Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
    Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/
    Signed-off-by: Chun-Kuang Hu <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/panthor: validate group queue count [+ + +]
Author: Chia-I Wu <[email protected]>
Date:   Wed Sep 3 12:21:33 2025 -0700

    drm/panthor: validate group queue count
    
    [ Upstream commit a00f2015acdbd8a4b3d2382eaeebe11db1925fad ]
    
    A panthor group can have at most MAX_CS_PER_CSG panthor queues.
    
    Fixes: 4bdca11507928 ("drm/panthor: Add the driver frontend block")
    Signed-off-by: Chia-I Wu <[email protected]>
    Reviewed-by: Boris Brezillon <[email protected]> # v1
    Reviewed-by: Steven Price <[email protected]>
    Signed-off-by: Steven Price <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
drm/xe: Attempt to bring bos back to VRAM after eviction [+ + +]
Author: Thomas Hellström <[email protected]>
Date:   Thu Sep 4 18:07:13 2025 +0200

    drm/xe: Attempt to bring bos back to VRAM after eviction
    
    commit 5c87fee3c96ce898ad681552404a66c7605193c0 upstream.
    
    VRAM+TT bos that are evicted from VRAM to TT may remain in
    TT also after a revalidation following eviction or suspend.
    
    This manifests itself as applications becoming sluggish
    after buffer objects get evicted or after a resume from
    suspend or hibernation.
    
    If the bo supports placement in both VRAM and TT, and
    we are on DGFX, mark the TT placement as fallback. This means
    that it is tried only after VRAM + eviction.
    
    This flaw has probably been present since the xe module was
    upstreamed but use a Fixes: commit below where backporting is
    likely to be simple. For earlier versions we need to open-
    code the fallback algorithm in the driver.
    
    v2:
    - Remove check for dgfx. (Matthew Auld)
    - Update the xe_dma_buf kunit test for the new strategy (CI)
    - Allow dma-buf to pin in current placement (CI)
    - Make xe_bo_validate() for pinned bos a NOP.
    
    Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/5995
    Fixes: a78a8da51b36 ("drm/ttm: replace busy placement with flags v6")
    Cc: Matthew Brost <[email protected]>
    Cc: Matthew Auld <[email protected]>
    Cc: <[email protected]> # v6.9+
    Signed-off-by: Thomas Hellström <[email protected]>
    Reviewed-by: Matthew Auld <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    (cherry picked from commit cb3d7b3b46b799c96b54f8e8fe36794a55a77f0b)
    Signed-off-by: Rodrigo Vivi <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
dt-bindings: serial: brcm,bcm7271-uart: Constrain clocks [+ + +]
Author: Krzysztof Kozlowski <[email protected]>
Date:   Tue Aug 12 14:16:31 2025 +0200

    dt-bindings: serial: brcm,bcm7271-uart: Constrain clocks
    
    commit ee047e1d85d73496541c54bd4f432c9464e13e65 upstream.
    
    Lists should have fixed constraints, because binding must be specific in
    respect to hardware, thus add missing constraints to number of clocks.
    
    Cc: stable <[email protected]>
    Fixes: 88a499cd70d4 ("dt-bindings: Add support for the Broadcom UART driver")
    Signed-off-by: Krzysztof Kozlowski <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
EDAC/altera: Delete an inappropriate dma_free_coherent() call [+ + +]
Author: Salah Triki <[email protected]>
Date:   Thu Jul 31 04:15:27 2025 +0100

    EDAC/altera: Delete an inappropriate dma_free_coherent() call
    
    commit ff2a66d21fd2364ed9396d151115eec59612b200 upstream.
    
    dma_free_coherent() must only be called if the corresponding
    dma_alloc_coherent() call has succeeded. Calling it when the allocation fails
    leads to undefined behavior.
    
    Delete the wrong call.
    
      [ bp: Massage commit message. ]
    
    Fixes: 71bcada88b0f3 ("edac: altera: Add Altera SDRAM EDAC support")
    Signed-off-by: Salah Triki <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Acked-by: Dinh Nguyen <[email protected]>
    Cc: [email protected]
    Link: https://lore.kernel.org/aIrfzzqh4IzYtDVC@pc
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
ext4: introduce linear search for dentries [+ + +]
Author: Theodore Ts'o <[email protected]>
Date:   Fri Feb 7 23:08:02 2025 -0500

    ext4: introduce linear search for dentries
    
    [ Upstream commit 9e28059d56649a7212d5b3f8751ec021154ba3dd ]
    
    This patch addresses an issue where some files in case-insensitive
    directories become inaccessible due to changes in how the kernel
    function, utf8_casefold(), generates case-folded strings from the
    commit 5c26d2f1d3f5 ("unicode: Don't special case ignorable code
    points").
    
    There are good reasons why this change should be made; it's actually
    quite stupid that Unicode seems to think that the characters ❤ and ❤️
    should be casefolded.  Unfortimately because of the backwards
    compatibility issue, this commit was reverted in 231825b2e1ff.
    
    This problem is addressed by instituting a brute-force linear fallback
    if a lookup fails on case-folded directory, which does result in a
    performance hit when looking up files affected by the changing how
    thekernel treats ignorable Uniode characters, or when attempting to
    look up non-existent file names.  So this fallback can be disabled by
    setting an encoding flag if in the future, the system administrator or
    the manufacturer of a mobile handset or tablet can be sure that there
    was no opportunity for a kernel to insert file names with incompatible
    encodings.
    
    Fixes: 5c26d2f1d3f5 ("unicode: Don't special case ignorable code points")
    Signed-off-by: Theodore Ts'o <[email protected]>
    Reviewed-by: Gabriel Krisman Bertazi <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
fhandle: use more consistent rules for decoding file handle from userns [+ + +]
Author: Amir Goldstein <[email protected]>
Date:   Wed Aug 27 21:43:09 2025 +0200

    fhandle: use more consistent rules for decoding file handle from userns
    
    [ Upstream commit bb585591ebf00fb1f6a1fdd1ea96b5848bd9112d ]
    
    Commit 620c266f39493 ("fhandle: relax open_by_handle_at() permission
    checks") relaxed the coditions for decoding a file handle from non init
    userns.
    
    The conditions are that that decoded dentry is accessible from the user
    provided mountfd (or to fs root) and that all the ancestors along the
    path have a valid id mapping in the userns.
    
    These conditions are intentionally more strict than the condition that
    the decoded dentry should be "lookable" by path from the mountfd.
    
    For example, the path /home/amir/dir/subdir is lookable by path from
    unpriv userns of user amir, because /home perms is 755, but the owner of
    /home does not have a valid id mapping in unpriv userns of user amir.
    
    The current code did not check that the decoded dentry itself has a
    valid id mapping in the userns.  There is no security risk in that,
    because that final open still performs the needed permission checks,
    but this is inconsistent with the checks performed on the ancestors,
    so the behavior can be a bit confusing.
    
    Add the check for the decoded dentry itself, so that the entire path,
    including the last component has a valid id mapping in the userns.
    
    Fixes: 620c266f39493 ("fhandle: relax open_by_handle_at() permission checks")
    Signed-off-by: Amir Goldstein <[email protected]>
    Link: https://lore.kernel.org/[email protected]
    Signed-off-by: Christian Brauner <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
 
flexfiles/pNFS: fix NULL checks on result of ff_layout_choose_ds_for_read [+ + +]
Author: Tigran Mkrtchyan <[email protected]>
Date:   Thu Aug 28 16:51:00 2025 +0200

    flexfiles/pNFS: fix NULL checks on result of ff_layout_choose_ds_for_read
    
    [ Upstream commit 5a46d2339a5ae268ede53a221f20433d8ea4f2f9 ]
    
    Recent commit f06bedfa62d5 ("pNFS/flexfiles: don't attempt pnfs on fatal DS
    errors") has changed the error return type of ff_layout_choose_ds_for_read() from
    NULL to an error pointer. However, not all code paths have been updated
    to match the change. Thus, some non-NULL checks will accept error pointers
    as a valid return value.
    
    Reported-by: Dan Carpenter <[email protected]>
    Suggested-by: Dan Carpenter <[email protected]>
    Fixes: f06bedfa62d5 ("pNFS/flexfiles: don't attempt pnfs on fatal DS errors")
    Signed-off-by: Tigran Mkrtchyan <[email protected]>
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
fs/nfs/io: make nfs_start_io_*() killable [+ + +]
Author: Max Kellermann <[email protected]>
Date:   Thu Nov 21 14:53:51 2024 +0100

    fs/nfs/io: make nfs_start_io_*() killable
    
    [ Upstream commit 38a125b31504f91bf6fdd3cfc3a3e9a721e6c97a ]
    
    This allows killing processes that wait for a lock when one process is
    stuck waiting for the NFS server.  This aims to complete the coverage
    of NFS operations being killable, like nfs_direct_wait() does, for
    example.
    
    Signed-off-by: Max Kellermann <[email protected]>
    Signed-off-by: Trond Myklebust <[email protected]>
    Stable-dep-of: 9eb90f435415 ("NFS: Serialise O_DIRECT i/o and truncate()")
    Signed-off-by: Sasha Levin <[email protected]>

 
ftrace/samples: Fix function size computation [+ + +]
Author: Vladimir Riabchun <[email protected]>
Date:   Tue Aug 26 18:16:46 2025 +0200

    ftrace/samples: Fix function size computation
    
    [ Upstream commit 80d03a40837a9b26750a25122b906c052cc846c9 ]
    
    In my_tramp1 function .size directive was placed above
    ASM_RET instruction, leading to a wrong function size.
    
    Link: https://lore.kernel.org/aK3d7vxNcO52kEmg@vova-pc
    Fixes: 9d907f1ae80b ("samples/ftrace: Fix asm function ELF annotations")
    Signed-off-by: Vladimir Riabchun <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
fuse: check if copy_file_range() returns larger than requested size [+ + +]
Author: Miklos Szeredi <[email protected]>
Date:   Tue Aug 12 14:07:54 2025 +0200

    fuse: check if copy_file_range() returns larger than requested size
    
    commit e5203209b3935041dac541bc5b37efb44220cc0b upstream.
    
    Just like write(), copy_file_range() should check if the return value is
    less or equal to the requested number of bytes.
    
    Reported-by: Chunsheng Luo <[email protected]>
    Closes: https://lore.kernel.org/all/[email protected]/
    Fixes: 88bc7d5097a1 ("fuse: add support for copy_file_range()")
    Cc: <[email protected]> # v4.20
    Signed-off-by: Miklos Szeredi <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

fuse: do not allow mapping a non-regular backing file [+ + +]
Author: Amir Goldstein <[email protected]>
Date:   Thu Jul 10 12:08:30 2025 +0200

    fuse: do not allow mapping a non-regular backing file
    
    commit e9c8da670e749f7dedc53e3af54a87b041918092 upstream.
    
    We do not support passthrough operations other than read/write on
    regular file, so allowing non-regular backing files makes no sense.
    
    Fixes: efad7153bf93 ("fuse: allow O_PATH fd for FUSE_DEV_IOC_BACKING_OPEN")
    Cc: [email protected]
    Signed-off-by: Amir Goldstein <[email protected]>
    Reviewed-by: Bernd Schubert <[email protected]>
    Signed-off-by: Miklos Szeredi <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

fuse: prevent overflow in copy_file_range return value [+ + +]
Author: Miklos Szeredi <[email protected]>
Date:   Tue Aug 12 14:46:34 2025 +0200

    fuse: prevent overflow in copy_file_range return value
    
    commit 1e08938c3694f707bb165535df352ac97a8c75c9 upstream.
    
    The FUSE protocol uses struct fuse_write_out to convey the return value of
    copy_file_range, which is restricted to uint32_t.  But the COPY_FILE_RANGE
    interface supports a 64-bit size copies.
    
    Currently the number of bytes copied is silently truncated to 32-bit, which
    may result in poor performance or even failure to copy in case of
    truncation to zero.
    
    Reported-by: Florian Weimer <[email protected]>
    Closes: https://lore.kernel.org/all/[email protected]/
    Fixes: 88bc7d5097a1 ("fuse: add support for copy_file_range()")
    Cc: <[email protected]> # v4.20
    Signed-off-by: Miklos Szeredi <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
genetlink: fix genl_bind() invoking bind() after -EPERM [+ + +]
Author: Alok Tiwari <[email protected]>
Date:   Fri Sep 5 06:57:27 2025 -0700

    genetlink: fix genl_bind() invoking bind() after -EPERM
    
    [ Upstream commit 1dbfb0363224f6da56f6655d596dc5097308d6f5 ]
    
    Per family bind/unbind callbacks were introduced to allow families
    to track multicast group consumer presence, e.g. to start or stop
    producing events depending on listeners.
    
    However, in genl_bind() the bind() callback was invoked even if
    capability checks failed and ret was set to -EPERM. This means that
    callbacks could run on behalf of unauthorized callers while the
    syscall still returned failure to user space.
    
    Fix this by only invoking bind() after "if (ret) break;" check
    i.e. after permission checks have succeeded.
    
    Fixes: 3de21a8990d3 ("genetlink: Add per family bind/unbind callbacks")
    Signed-off-by: Alok Tiwari <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
hrtimers: Unconditionally update target CPU base after offline timer migration [+ + +]
Author: Xiongfeng Wang <[email protected]>
Date:   Tue Aug 5 16:10:25 2025 +0800

    hrtimers: Unconditionally update target CPU base after offline timer migration
    
    commit e895f8e29119c8c966ea794af9e9100b10becb88 upstream.
    
    When testing softirq based hrtimers on an ARM32 board, with high resolution
    mode and NOHZ inactive, softirq based hrtimers fail to expire after being
    moved away from an offline CPU:
    
    CPU0                            CPU1
                                    hrtimer_start(..., HRTIMER_MODE_SOFT);
    cpu_down(CPU1)                  ...
                                    hrtimers_cpu_dying()
                                      // Migrate timers to CPU0
                                      smp_call_function_single(CPU0, returgger_next_event);
      retrigger_next_event()
        if (!highres && !nohz)
            return;
    
    As retrigger_next_event() is a NOOP when both high resolution timers and
    NOHZ are inactive CPU0's hrtimer_cpu_base::softirq_expires_next is not
    updated and the migrated softirq timers never expire unless there is a
    softirq based hrtimer queued on CPU0 later.
    
    Fix this by removing the hrtimer_hres_active() and tick_nohz_active() check
    in retrigger_next_event(), which enforces a full update of the CPU base.
    As this is not a fast path the extra cost does not matter.
    
    [ tglx: Massaged change log ]
    
    Fixes: 5c0930ccaad5 ("hrtimers: Push pending hrtimers away from outgoing CPU earlier")
    Co-developed-by: Frederic Weisbecker <[email protected]>
    Signed-off-by: Frederic Weisbecker <[email protected]>
    Signed-off-by: Xiongfeng Wang <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Link: https://lore.kernel.org/all/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
hsr: use hsr_for_each_port_rtnl in hsr_port_get_hsr [+ + +]
Author: Hangbin Liu <[email protected]>
Date:   Fri Sep 5 09:15:32 2025 +0000

    hsr: use hsr_for_each_port_rtnl in hsr_port_get_hsr
    
    [ Upstream commit 393c841fe4333cdd856d0ca37b066d72746cfaa6 ]
    
    hsr_port_get_hsr() iterates over ports using hsr_for_each_port(),
    but many of its callers do not hold the required RCU lock.
    
    Switch to hsr_for_each_port_rtnl(), since most callers already hold
    the rtnl lock. After review, all callers are covered by either the rtnl
    lock or the RCU lock, except hsr_dev_xmit(). Fix this by adding an
    RCU read lock there.
    
    Fixes: c5a759117210 ("net/hsr: Use list_head (and rcu) instead of array for slave devices.")
    Signed-off-by: Hangbin Liu <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

hsr: use rtnl lock when iterating over ports [+ + +]
Author: Hangbin Liu <[email protected]>
Date:   Fri Sep 5 09:15:31 2025 +0000

    hsr: use rtnl lock when iterating over ports
    
    [ Upstream commit 8884c693991333ae065830554b9b0c96590b1bb2 ]
    
    hsr_for_each_port is called in many places without holding the RCU read
    lock, this may trigger warnings on debug kernels. Most of the callers
    are actually hold rtnl lock. So add a new helper hsr_for_each_port_rtnl
    to allow callers in suitable contexts to iterate ports safely without
    explicit RCU locking.
    
    This patch only fixed the callers that is hold rtnl lock. Other caller
    issues will be fixed in later patches.
    
    Fixes: c5a759117210 ("net/hsr: Use list_head (and rcu) instead of array for slave devices.")
    Signed-off-by: Hangbin Liu <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
i2c: i801: Hide Intel Birch Stream SoC TCO WDT [+ + +]
Author: Chiasheng Lee <[email protected]>
Date:   Mon Sep 1 20:59:43 2025 +0800

    i2c: i801: Hide Intel Birch Stream SoC TCO WDT
    
    commit 664596bd98bb251dd417dfd3f9b615b661e1e44a upstream.
    
    Hide the Intel Birch Stream SoC TCO WDT feature since it was removed.
    
    On platforms with PCH TCO WDT, this redundant device might be rendering
    errors like this:
    
    [   28.144542] sysfs: cannot create duplicate filename '/bus/platform/devices/iTCO_wdt'
    
    Fixes: 8c56f9ef25a3 ("i2c: i801: Add support for Intel Birch Stream SoC")
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=220320
    Signed-off-by: Chiasheng Lee <[email protected]>
    Cc: <[email protected]> # v6.7+
    Reviewed-by: Mika Westerberg <[email protected]>
    Reviewed-by: Jarkko Nikula <[email protected]>
    Signed-off-by: Andi Shyti <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
i40e: fix IRQ freeing in i40e_vsi_request_irq_msix error path [+ + +]
Author: Michal Schmidt <[email protected]>
Date:   Mon Aug 18 17:39:03 2025 +0200

    i40e: fix IRQ freeing in i40e_vsi_request_irq_msix error path
    
    [ Upstream commit 915470e1b44e71d1dd07ee067276f003c3521ee3 ]
    
    If request_irq() in i40e_vsi_request_irq_msix() fails in an iteration
    later than the first, the error path wants to free the IRQs requested
    so far. However, it uses the wrong dev_id argument for free_irq(), so
    it does not free the IRQs correctly and instead triggers the warning:
    
     Trying to free already-free IRQ 173
     WARNING: CPU: 25 PID: 1091 at kernel/irq/manage.c:1829 __free_irq+0x192/0x2c0
     Modules linked in: i40e(+) [...]
     CPU: 25 UID: 0 PID: 1091 Comm: NetworkManager Not tainted 6.17.0-rc1+ #1 PREEMPT(lazy)
     Hardware name: [...]
     RIP: 0010:__free_irq+0x192/0x2c0
     [...]
     Call Trace:
      <TASK>
      free_irq+0x32/0x70
      i40e_vsi_request_irq_msix.cold+0x63/0x8b [i40e]
      i40e_vsi_request_irq+0x79/0x80 [i40e]
      i40e_vsi_open+0x21f/0x2f0 [i40e]
      i40e_open+0x63/0x130 [i40e]
      __dev_open+0xfc/0x210
      __dev_change_flags+0x1fc/0x240
      netif_change_flags+0x27/0x70
      do_setlink.isra.0+0x341/0xc70
      rtnl_newlink+0x468/0x860
      rtnetlink_rcv_msg+0x375/0x450
      netlink_rcv_skb+0x5c/0x110
      netlink_unicast+0x288/0x3c0
      netlink_sendmsg+0x20d/0x430
      ____sys_sendmsg+0x3a2/0x3d0
      ___sys_sendmsg+0x99/0xe0
      __sys_sendmsg+0x8a/0xf0
      do_syscall_64+0x82/0x2c0
      entry_SYSCALL_64_after_hwframe+0x76/0x7e
      [...]
      </TASK>
     ---[ end trace 0000000000000000 ]---
    
    Use the same dev_id for free_irq() as for request_irq().
    
    I tested this with inserting code to fail intentionally.
    
    Fixes: 493fb30011b3 ("i40e: Move q_vectors from pointer to array to array of pointers")
    Signed-off-by: Michal Schmidt <[email protected]>
    Reviewed-by: Aleksandr Loktionov <[email protected]>
    Reviewed-by: Subbaraya Sundeep <[email protected]>
    Tested-by: Rinitha S <[email protected]> (A Contingent worker at Intel)
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
igb: fix link test skipping when interface is admin down [+ + +]
Author: Kohei Enju <[email protected]>
Date:   Fri Aug 15 15:26:31 2025 +0900

    igb: fix link test skipping when interface is admin down
    
    [ Upstream commit d709f178abca22a4d3642513df29afe4323a594b ]
    
    The igb driver incorrectly skips the link test when the network
    interface is admin down (if_running == false), causing the test to
    always report PASS regardless of the actual physical link state.
    
    This behavior is inconsistent with other drivers (e.g. i40e, ice, ixgbe,
    etc.) which correctly test the physical link state regardless of admin
    state.
    Remove the if_running check to ensure link test always reflects the
    physical link state.
    
    Fixes: 8d420a1b3ea6 ("igb: correct link test not being run when link is down")
    Signed-off-by: Kohei Enju <[email protected]>
    Reviewed-by: Paul Menzel <[email protected]>
    Tested-by: Rinitha S <[email protected]> (A Contingent worker at Intel)
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
Input: i8042 - add TUXEDO InfinityBook Pro Gen10 AMD to i8042 quirk table [+ + +]
Author: Christoffer Sandberg <[email protected]>
Date:   Tue Aug 26 16:26:06 2025 +0200

    Input: i8042 - add TUXEDO InfinityBook Pro Gen10 AMD to i8042 quirk table
    
    commit 1939a9fcb80353dd8b111aa1e79c691afbde08b4 upstream.
    
    Occasionally wakes up from suspend with missing input on the internal
    keyboard. Setting the quirks appears to fix the issue for this device as
    well.
    
    Signed-off-by: Christoffer Sandberg <[email protected]>
    Signed-off-by: Werner Sembach <[email protected]>
    Cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

Input: iqs7222 - avoid enabling unused interrupts [+ + +]
Author: Jeff LaBundy <[email protected]>
Date:   Sun Aug 17 19:20:22 2025 -0500

    Input: iqs7222 - avoid enabling unused interrupts
    
    commit c9ddc41cdd522f2db5d492eda3df8994d928be34 upstream.
    
    If a proximity event node is defined so as to specify the wake-up
    properties of the touch surface, the proximity event interrupt is
    enabled unconditionally. This may result in unwanted interrupts.
    
    Solve this problem by enabling the interrupt only if the event is
    mapped to a key or switch code.
    
    Signed-off-by: Jeff LaBundy <[email protected]>
    Link: https://lore.kernel.org/r/aKJxxgEWpNaNcUaW@nixie71
    Cc: [email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
kernfs: Fix UAF in polling when open file is released [+ + +]
Author: Chen Ridong <[email protected]>
Date:   Fri Aug 22 07:07:14 2025 +0000

    kernfs: Fix UAF in polling when open file is released
    
    commit 3c9ba2777d6c86025e1ba4186dc5cd930e40ec5f upstream.
    
    A use-after-free (UAF) vulnerability was identified in the PSI (Pressure
    Stall Information) monitoring mechanism:
    
    BUG: KASAN: slab-use-after-free in psi_trigger_poll+0x3c/0x140
    Read of size 8 at addr ffff3de3d50bd308 by task systemd/1
    
    psi_trigger_poll+0x3c/0x140
    cgroup_pressure_poll+0x70/0xa0
    cgroup_file_poll+0x8c/0x100
    kernfs_fop_poll+0x11c/0x1c0
    ep_item_poll.isra.0+0x188/0x2c0
    
    Allocated by task 1:
    cgroup_file_open+0x88/0x388
    kernfs_fop_open+0x73c/0xaf0
    do_dentry_open+0x5fc/0x1200
    vfs_open+0xa0/0x3f0
    do_open+0x7e8/0xd08
    path_openat+0x2fc/0x6b0
    do_filp_open+0x174/0x368
    
    Freed by task 8462:
    cgroup_file_release+0x130/0x1f8
    kernfs_drain_open_files+0x17c/0x440
    kernfs_drain+0x2dc/0x360
    kernfs_show+0x1b8/0x288
    cgroup_file_show+0x150/0x268
    cgroup_pressure_write+0x1dc/0x340
    cgroup_file_write+0x274/0x548
    
    Reproduction Steps:
    1. Open test/cpu.pressure and establish epoll monitoring
    2. Disable monitoring: echo 0 > test/cgroup.pressure
    3. Re-enable monitoring: echo 1 > test/cgroup.pressure
    
    The race condition occurs because:
    1. When cgroup.pressure is disabled (echo 0 > cgroup.pressure), it:
       - Releases PSI triggers via cgroup_file_release()
       - Frees of->priv through kernfs_drain_open_files()
    2. While epoll still holds reference to the file and continues polling
    3. Re-enabling (echo 1 > cgroup.pressure) accesses freed of->priv
    
    epolling                        disable/enable cgroup.pressure
    fd=open(cpu.pressure)
    while(1)
    ...
    epoll_wait
    kernfs_fop_poll
    kernfs_get_active = true        echo 0 > cgroup.pressure
    ...                             cgroup_file_show
                                    kernfs_show
                                    // inactive kn
                                    kernfs_drain_open_files
                                    cft->release(of);
                                    kfree(ctx);
                                    ...
    kernfs_get_active = false
                                    echo 1 > cgroup.pressure
                                    kernfs_show
                                    kernfs_activate_one(kn);
    kernfs_fop_poll
    kernfs_get_active = true
    cgroup_file_poll
    psi_trigger_poll
    // UAF
    ...
    end: close(fd)
    
    To address this issue, introduce kernfs_get_active_of() for kernfs open
    files to obtain active references. This function will fail if the open file
    has been released. Replace kernfs_get_active() with kernfs_get_active_of()
    to prevent further operations on released file descriptors.
    
    Fixes: 34f26a15611a ("sched/psi: Per-cgroup PSI accounting disable/re-enable interface")
    Cc: stable <[email protected]>
    Reported-by: Zhang Zhaotian <[email protected]>
    Signed-off-by: Chen Ridong <[email protected]>
    Acked-by: Tejun Heo <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
kunit: kasan_test: disable fortify string checker on kasan_strings() test [+ + +]
Author: Yeoreum Yun <[email protected]>
Date:   Fri Aug 1 13:02:36 2025 +0100

    kunit: kasan_test: disable fortify string checker on kasan_strings() test
    
    commit 7a19afee6fb39df63ddea7ce78976d8c521178c6 upstream.
    
    Similar to commit 09c6304e38e4 ("kasan: test: fix compatibility with
    FORTIFY_SOURCE") the kernel is panicing in kasan_string().
    
    This is due to the `src` and `ptr` not being hidden from the optimizer
    which would disable the runtime fortify string checker.
    
    Call trace:
      __fortify_panic+0x10/0x20 (P)
      kasan_strings+0x980/0x9b0
      kunit_try_run_case+0x68/0x190
      kunit_generic_run_threadfn_adapter+0x34/0x68
      kthread+0x1c4/0x228
      ret_from_fork+0x10/0x20
     Code: d503233f a9bf7bfd 910003fd 9424b243 (d4210000)
     ---[ end trace 0000000000000000 ]---
     note: kunit_try_catch[128] exited with irqs disabled
     note: kunit_try_catch[128] exited with preempt_count 1
         # kasan_strings: try faulted: last
    ** replaying previous printk message **
         # kasan_strings: try faulted: last line seen mm/kasan/kasan_test_c.c:1600
         # kasan_strings: internal error occurred preventing test case from running: -4
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 73228c7ecc5e ("KASAN: port KASAN Tests to KUnit")
    Signed-off-by: Yeoreum Yun <[email protected]>
    Cc: Alexander Potapenko <[email protected]>
    Cc: Andrey Konovalov <[email protected]>
    Cc: Andrey Ryabinin <[email protected]>
    Cc: Dmitriy Vyukov <[email protected]>
    Cc: Vincenzo Frascino <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Yeoreum Yun <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
libceph: fix invalid accesses to ceph_connection_v1_info [+ + +]
Author: Ilya Dryomov <[email protected]>
Date:   Thu Jul 3 12:10:50 2025 +0200

    libceph: fix invalid accesses to ceph_connection_v1_info
    
    commit cdbc9836c7afadad68f374791738f118263c5371 upstream.
    
    There is a place where generic code in messenger.c is reading and
    another place where it is writing to con->v1 union member without
    checking that the union member is active (i.e. msgr1 is in use).
    
    On 64-bit systems, con->v1.auth_retry overlaps with con->v2.out_iter,
    so such a read is almost guaranteed to return a bogus value instead of
    0 when msgr2 is in use.  This ends up being fairly benign because the
    side effect is just the invalidation of the authorizer and successive
    fetching of new tickets.
    
    con->v1.connect_seq overlaps with con->v2.conn_bufs and the fact that
    it's being written to can cause more serious consequences, but luckily
    it's not something that happens often.
    
    Cc: [email protected]
    Fixes: cd1a677cad99 ("libceph, ceph: implement msgr2.1 protocol (crc and secure modes)")
    Signed-off-by: Ilya Dryomov <[email protected]>
    Reviewed-by: Viacheslav Dubeyko <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
Linux: Linux 6.12.48 [+ + +]
Author: Greg Kroah-Hartman <[email protected]>
Date:   Fri Sep 19 16:35:52 2025 +0200

    Linux 6.12.48
    
    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Hardik Garg <[email protected]>
    Tested-by: Jon Hunter <[email protected]>
    Tested-by: Harshit Mogalapalli <[email protected]>
    Tested-by: Brett A C Sheffield <[email protected]>
    Tested-by: Salvatore Bonaccorso <[email protected]>
    Tested-by: Ron Economos <[email protected]>
    Tested-by: Brett Mastbergen <[email protected]>
    Tested-by: Mark Brown <[email protected]>
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Pavel Machek (CIP) <[email protected]>
    Tested-by: Peter Schneider <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mm/damon/core: set quota->charged_from to jiffies at first charge window [+ + +]
Author: Sang-Heon Jeon <[email protected]>
Date:   Fri Aug 22 11:50:57 2025 +0900

    mm/damon/core: set quota->charged_from to jiffies at first charge window
    
    commit ce652aac9c90a96c6536681d17518efb1f660fb8 upstream.
    
    Kernel initializes the "jiffies" timer as 5 minutes below zero, as shown
    in include/linux/jiffies.h
    
     /*
     * Have the 32 bit jiffies value wrap 5 minutes after boot
     * so jiffies wrap bugs show up earlier.
     */
     #define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ))
    
    And jiffies comparison help functions cast unsigned value to signed to
    cover wraparound
    
     #define time_after_eq(a,b) \
      (typecheck(unsigned long, a) && \
      typecheck(unsigned long, b) && \
      ((long)((a) - (b)) >= 0))
    
    When quota->charged_from is initialized to 0, time_after_eq() can
    incorrectly return FALSE even after reset_interval has elapsed.  This
    occurs when (jiffies - reset_interval) produces a value with MSB=1, which
    is interpreted as negative in signed arithmetic.
    
    This issue primarily affects 32-bit systems because: On 64-bit systems:
    MSB=1 values occur after ~292 million years from boot (assuming HZ=1000),
    almost impossible.
    
    On 32-bit systems: MSB=1 values occur during the first 5 minutes after
    boot, and the second half of every jiffies wraparound cycle, starting from
    day 25 (assuming HZ=1000)
    
    When above unexpected FALSE return from time_after_eq() occurs, the
    charging window will not reset.  The user impact depends on esz value at
    that time.
    
    If esz is 0, scheme ignores configured quotas and runs without any limits.
    
    If esz is not 0, scheme stops working once the quota is exhausted.  It
    remains until the charging window finally resets.
    
    So, change quota->charged_from to jiffies at damos_adjust_quota() when it
    is considered as the first charge window.  By this change, we can avoid
    unexpected FALSE return from time_after_eq()
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 2b8a248d5873 ("mm/damon/schemes: implement size quota for schemes application speed control") # 5.16
    Signed-off-by: Sang-Heon Jeon <[email protected]>
    Reviewed-by: SeongJae Park <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mm/damon/lru_sort: avoid divide-by-zero in damon_lru_sort_apply_parameters() [+ + +]
Author: Quanmin Yan <[email protected]>
Date:   Wed Aug 27 19:58:57 2025 +0800

    mm/damon/lru_sort: avoid divide-by-zero in damon_lru_sort_apply_parameters()
    
    commit 711f19dfd783ffb37ca4324388b9c4cb87e71363 upstream.
    
    Patch series "mm/damon: avoid divide-by-zero in DAMON module's parameters
    application".
    
    DAMON's RECLAIM and LRU_SORT modules perform no validation on
    user-configured parameters during application, which may lead to
    division-by-zero errors.
    
    Avoid the divide-by-zero by adding validation checks when DAMON modules
    attempt to apply the parameters.
    
    
    This patch (of 2):
    
    During the calculation of 'hot_thres' and 'cold_thres', either
    'sample_interval' or 'aggr_interval' is used as the divisor, which may
    lead to division-by-zero errors.  Fix it by directly returning -EINVAL
    when such a case occurs.  Additionally, since 'aggr_interval' is already
    required to be set no smaller than 'sample_interval' in damon_set_attrs(),
    only the case where 'sample_interval' is zero needs to be checked.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 40e983cca927 ("mm/damon: introduce DAMON-based LRU-lists Sorting")
    Signed-off-by: Quanmin Yan <[email protected]>
    Reviewed-by: SeongJae Park <[email protected]>
    Cc: Kefeng Wang <[email protected]>
    Cc: ze zuo <[email protected]>
    Cc: <[email protected]>    [6.0+]
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mm/damon/reclaim: avoid divide-by-zero in damon_reclaim_apply_parameters() [+ + +]
Author: Quanmin Yan <[email protected]>
Date:   Wed Aug 27 19:58:58 2025 +0800

    mm/damon/reclaim: avoid divide-by-zero in damon_reclaim_apply_parameters()
    
    commit e6b543ca9806d7bced863f43020e016ee996c057 upstream.
    
    When creating a new scheme of DAMON_RECLAIM, the calculation of
    'min_age_region' uses 'aggr_interval' as the divisor, which may lead to
    division-by-zero errors.  Fix it by directly returning -EINVAL when such a
    case occurs.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: f5a79d7c0c87 ("mm/damon: introduce struct damos_access_pattern")
    Signed-off-by: Quanmin Yan <[email protected]>
    Reviewed-by: SeongJae Park <[email protected]>
    Cc: Kefeng Wang <[email protected]>
    Cc: ze zuo <[email protected]>
    Cc: <[email protected]>    [6.1+]
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: SeongJae Park <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mm/damon/sysfs: fix use-after-free in state_show() [+ + +]
Author: Stanislav Fort <[email protected]>
Date:   Fri Sep 5 13:10:46 2025 +0300

    mm/damon/sysfs: fix use-after-free in state_show()
    
    commit 3260a3f0828e06f5f13fac69fb1999a6d60d9cff upstream.
    
    state_show() reads kdamond->damon_ctx without holding damon_sysfs_lock.
    This allows a use-after-free race:
    
    CPU 0                         CPU 1
    -----                         -----
    state_show()                  damon_sysfs_turn_damon_on()
    ctx = kdamond->damon_ctx;     mutex_lock(&damon_sysfs_lock);
                                  damon_destroy_ctx(kdamond->damon_ctx);
                                  kdamond->damon_ctx = NULL;
                                  mutex_unlock(&damon_sysfs_lock);
    damon_is_running(ctx);        /* ctx is freed */
    mutex_lock(&ctx->kdamond_lock); /* UAF */
    
    (The race can also occur with damon_sysfs_kdamonds_rm_dirs() and
    damon_sysfs_kdamond_release(), which free or replace the context under
    damon_sysfs_lock.)
    
    Fix by taking damon_sysfs_lock before dereferencing the context, mirroring
    the locking used in pid_show().
    
    The bug has existed since state_show() first accessed kdamond->damon_ctx.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: a61ea561c871 ("mm/damon/sysfs: link DAMON for virtual address spaces monitoring")
    Signed-off-by: Stanislav Fort <[email protected]>
    Reported-by: Stanislav Fort <[email protected]>
    Reviewed-by: SeongJae Park <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: SeongJae Park <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mm/hugetlb: add missing hugetlb_lock in __unmap_hugepage_range() [+ + +]
Author: Jeongjun Park <[email protected]>
Date:   Sat Sep 13 15:10:32 2025 -0400

    mm/hugetlb: add missing hugetlb_lock in __unmap_hugepage_range()
    
    [ Upstream commit 21cc2b5c5062a256ae9064442d37ebbc23f5aef7 ]
    
    When restoring a reservation for an anonymous page, we need to check to
    freeing a surplus.  However, __unmap_hugepage_range() causes data race
    because it reads h->surplus_huge_pages without the protection of
    hugetlb_lock.
    
    And adjust_reservation is a boolean variable that indicates whether
    reservations for anonymous pages in each folio should be restored.
    Therefore, it should be initialized to false for each round of the loop.
    However, this variable is not initialized to false except when defining
    the current adjust_reservation variable.
    
    This means that once adjust_reservation is set to true even once within
    the loop, reservations for anonymous pages will be restored
    unconditionally in all subsequent rounds, regardless of the folio's state.
    
    To fix this, we need to add the missing hugetlb_lock, unlock the
    page_table_lock earlier so that we don't lock the hugetlb_lock inside the
    page_table_lock lock, and initialize adjust_reservation to false on each
    round within the loop.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: df7a6d1f6405 ("mm/hugetlb: restore the reservation if needed")
    Signed-off-by: Jeongjun Park <[email protected]>
    Reported-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?extid=417aeb05fd190f3a6da9
    Reviewed-by: Sidhartha Kumar <[email protected]>
    Cc: Breno Leitao <[email protected]>
    Cc: David Hildenbrand <[email protected]>
    Cc: Muchun Song <[email protected]>
    Cc: Oscar Salvador <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    [ Page vs folio differences ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mm/khugepaged: fix the address passed to notifier on testing young [+ + +]
Author: Wei Yang <[email protected]>
Date:   Fri Aug 22 06:33:18 2025 +0000

    mm/khugepaged: fix the address passed to notifier on testing young
    
    commit 394bfac1c7f7b701c2c93834c5761b9c9ceeebcf upstream.
    
    Commit 8ee53820edfd ("thp: mmu_notifier_test_young") introduced
    mmu_notifier_test_young(), but we are passing the wrong address.
    In xxx_scan_pmd(), the actual iteration address is "_address" not
    "address".  We seem to misuse the variable on the very beginning.
    
    Change it to the right one.
    
    [[email protected] fix whitespace, per everyone]
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 8ee53820edfd ("thp: mmu_notifier_test_young")
    Signed-off-by: Wei Yang <[email protected]>
    Reviewed-by: Dev Jain <[email protected]>
    Reviewed-by: Zi Yan <[email protected]>
    Acked-by: David Hildenbrand <[email protected]>
    Reviewed-by: Lorenzo Stoakes <[email protected]>
    Cc: Baolin Wang <[email protected]>
    Cc: Liam R. Howlett <[email protected]>
    Cc: Nico Pache <[email protected]>
    Cc: Ryan Roberts <[email protected]>
    Cc: Barry Song <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mm/memory-failure: fix redundant updates for already poisoned pages [+ + +]
Author: Kyle Meyer <[email protected]>
Date:   Thu Aug 28 13:38:20 2025 -0500

    mm/memory-failure: fix redundant updates for already poisoned pages
    
    commit 3be306cccdccede13e3cefd0c14e430cc2b7c9c7 upstream.
    
    Duplicate memory errors can be reported by multiple sources.
    
    Passing an already poisoned page to action_result() causes issues:
    
    * The amount of hardware corrupted memory is incorrectly updated.
    * Per NUMA node MF stats are incorrectly updated.
    * Redundant "already poisoned" messages are printed.
    
    Avoid those issues by:
    
    * Skipping hardware corrupted memory updates for already poisoned pages.
    * Skipping per NUMA node MF stats updates for already poisoned pages.
    * Dropping redundant "already poisoned" messages.
    
    Make MF_MSG_ALREADY_POISONED consistent with other action_page_types and
    make calls to action_result() consistent for already poisoned normal pages
    and huge pages.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: b8b9488d50b7 ("mm/memory-failure: improve memory failure action_result messages")
    Signed-off-by: Kyle Meyer <[email protected]>
    Reviewed-by: Jiaqi Yan <[email protected]>
    Acked-by: David Hildenbrand <[email protected]>
    Reviewed-by: Jane Chu <[email protected]>
    Acked-by: Miaohe Lin <[email protected]>
    Cc: Borislav Betkov <[email protected]>
    Cc: Kyle Meyer <[email protected]>
    Cc: Liam Howlett <[email protected]>
    Cc: Lorenzo Stoakes <[email protected]>
    Cc: "Luck, Tony" <[email protected]>
    Cc: Michal Hocko <[email protected]>
    Cc: Mike Rapoport <[email protected]>
    Cc: Naoya Horiguchi <[email protected]>
    Cc: Oscar Salvador <[email protected]>
    Cc: Russ Anderson <[email protected]>
    Cc: Suren Baghdasaryan <[email protected]>
    Cc: Vlastimil Babka <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

mm/memory-failure: fix VM_BUG_ON_PAGE(PagePoisoned(page)) when unpoison memory [+ + +]
Author: Miaohe Lin <[email protected]>
Date:   Thu Aug 28 10:46:18 2025 +0800

    mm/memory-failure: fix VM_BUG_ON_PAGE(PagePoisoned(page)) when unpoison memory
    
    commit d613f53c83ec47089c4e25859d5e8e0359f6f8da upstream.
    
    When I did memory failure tests, below panic occurs:
    
    page dumped because: VM_BUG_ON_PAGE(PagePoisoned(page))
    kernel BUG at include/linux/page-flags.h:616!
    Oops: invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
    CPU: 3 PID: 720 Comm: bash Not tainted 6.10.0-rc1-00195-g148743902568 #40
    RIP: 0010:unpoison_memory+0x2f3/0x590
    RSP: 0018:ffffa57fc8787d60 EFLAGS: 00000246
    RAX: 0000000000000037 RBX: 0000000000000009 RCX: ffff9be25fcdc9c8
    RDX: 0000000000000000 RSI: 0000000000000027 RDI: ffff9be25fcdc9c0
    RBP: 0000000000300000 R08: ffffffffb4956f88 R09: 0000000000009ffb
    R10: 0000000000000284 R11: ffffffffb4926fa0 R12: ffffe6b00c000000
    R13: ffff9bdb453dfd00 R14: 0000000000000000 R15: fffffffffffffffe
    FS:  00007f08f04e4740(0000) GS:ffff9be25fcc0000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000564787a30410 CR3: 000000010d4e2000 CR4: 00000000000006f0
    Call Trace:
     <TASK>
     unpoison_memory+0x2f3/0x590
     simple_attr_write_xsigned.constprop.0.isra.0+0xb3/0x110
     debugfs_attr_write+0x42/0x60
     full_proxy_write+0x5b/0x80
     vfs_write+0xd5/0x540
     ksys_write+0x64/0xe0
     do_syscall_64+0xb9/0x1d0
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    RIP: 0033:0x7f08f0314887
    RSP: 002b:00007ffece710078 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
    RAX: ffffffffffffffda RBX: 0000000000000009 RCX: 00007f08f0314887
    RDX: 0000000000000009 RSI: 0000564787a30410 RDI: 0000000000000001
    RBP: 0000564787a30410 R08: 000000000000fefe R09: 000000007fffffff
    R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000009
    R13: 00007f08f041b780 R14: 00007f08f0417600 R15: 00007f08f0416a00
     </TASK>
    Modules linked in: hwpoison_inject
    ---[ end trace 0000000000000000 ]---
    RIP: 0010:unpoison_memory+0x2f3/0x590
    RSP: 0018:ffffa57fc8787d60 EFLAGS: 00000246
    RAX: 0000000000000037 RBX: 0000000000000009 RCX: ffff9be25fcdc9c8
    RDX: 0000000000000000 RSI: 0000000000000027 RDI: ffff9be25fcdc9c0
    RBP: 0000000000300000 R08: ffffffffb4956f88 R09: 0000000000009ffb
    R10: 0000000000000284 R11: ffffffffb4926fa0 R12: ffffe6b00c000000
    R13: ffff9bdb453dfd00 R14: 0000000000000000 R15: fffffffffffffffe
    FS:  00007f08f04e4740(0000) GS:ffff9be25fcc0000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000564787a30410 CR3: 000000010d4e2000 CR4: 00000000000006f0
    Kernel panic - not syncing: Fatal exception
    Kernel Offset: 0x31c00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
    ---[ end Kernel panic - not syncing: Fatal exception ]---
    
    The root cause is that unpoison_memory() tries to check the PG_HWPoison
    flags of an uninitialized page.  So VM_BUG_ON_PAGE(PagePoisoned(page)) is
    triggered.  This can be reproduced by below steps:
    
    1.Offline memory block:
    
     echo offline > /sys/devices/system/memory/memory12/state
    
    2.Get offlined memory pfn:
    
     page-types -b n -rlN
    
    3.Write pfn to unpoison-pfn
    
     echo <pfn> > /sys/kernel/debug/hwpoison/unpoison-pfn
    
    This scenario can be identified by pfn_to_online_page() returning NULL.
    And ZONE_DEVICE pages are never expected, so we can simply fail if
    pfn_to_online_page() == NULL to fix the bug.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: f1dd2cd13c4b ("mm, memory_hotplug: do not associate hotadded memory to zones until online")
    Signed-off-by: Miaohe Lin <[email protected]>
    Suggested-by: David Hildenbrand <[email protected]>
    Acked-by: David Hildenbrand <[email protected]>
    Cc: Naoya Horiguchi <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mm: introduce and use {pgd,p4d}_populate_kernel() [+ + +]
Author: Harry Yoo <[email protected]>
Date:   Mon Aug 18 11:02:05 2025 +0900

    mm: introduce and use {pgd,p4d}_populate_kernel()
    
    commit f2d2f9598ebb0158a3fe17cda0106d7752e654a2 upstream.
    
    Introduce and use {pgd,p4d}_populate_kernel() in core MM code when
    populating PGD and P4D entries for the kernel address space.  These
    helpers ensure proper synchronization of page tables when updating the
    kernel portion of top-level page tables.
    
    Until now, the kernel has relied on each architecture to handle
    synchronization of top-level page tables in an ad-hoc manner.  For
    example, see commit 9b861528a801 ("x86-64, mem: Update all PGDs for direct
    mapping and vmemmap mapping changes").
    
    However, this approach has proven fragile for following reasons:
    
      1) It is easy to forget to perform the necessary page table
         synchronization when introducing new changes.
         For instance, commit 4917f55b4ef9 ("mm/sparse-vmemmap: improve memory
         savings for compound devmaps") overlooked the need to synchronize
         page tables for the vmemmap area.
    
      2) It is also easy to overlook that the vmemmap and direct mapping areas
         must not be accessed before explicit page table synchronization.
         For example, commit 8d400913c231 ("x86/vmemmap: handle unpopulated
         sub-pmd ranges")) caused crashes by accessing the vmemmap area
         before calling sync_global_pgds().
    
    To address this, as suggested by Dave Hansen, introduce _kernel() variants
    of the page table population helpers, which invoke architecture-specific
    hooks to properly synchronize page tables.  These are introduced in a new
    header file, include/linux/pgalloc.h, so they can be called from common
    code.
    
    They reuse existing infrastructure for vmalloc and ioremap.
    Synchronization requirements are determined by ARCH_PAGE_TABLE_SYNC_MASK,
    and the actual synchronization is performed by
    arch_sync_kernel_mappings().
    
    This change currently targets only x86_64, so only PGD and P4D level
    helpers are introduced.  Currently, these helpers are no-ops since no
    architecture sets PGTBL_{PGD,P4D}_MODIFIED in ARCH_PAGE_TABLE_SYNC_MASK.
    
    In theory, PUD and PMD level helpers can be added later if needed by other
    architectures.  For now, 32-bit architectures (x86-32 and arm) only handle
    PGTBL_PMD_MODIFIED, so p*d_populate_kernel() will never affect them unless
    we introduce a PMD level helper.
    
    [[email protected]: fix KASAN build error due to p*d_populate_kernel()]
      Link: https://lkml.kernel.org/r/[email protected]
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 8d400913c231 ("x86/vmemmap: handle unpopulated sub-pmd ranges")
    Signed-off-by: Harry Yoo <[email protected]>
    Suggested-by: Dave Hansen <[email protected]>
    Acked-by: Kiryl Shutsemau <[email protected]>
    Reviewed-by: Mike Rapoport (Microsoft) <[email protected]>
    Reviewed-by: Lorenzo Stoakes <[email protected]>
    Acked-by: David Hildenbrand <[email protected]>
    Cc: Alexander Potapenko <[email protected]>
    Cc: Alistair Popple <[email protected]>
    Cc: Andrey Konovalov <[email protected]>
    Cc: Andrey Ryabinin <[email protected]>
    Cc: Andy Lutomirski <[email protected]>
    Cc: "Aneesh Kumar K.V" <[email protected]>
    Cc: Anshuman Khandual <[email protected]>
    Cc: Ard Biesheuvel <[email protected]>
    Cc: Arnd Bergmann <[email protected]>
    Cc: bibo mao <[email protected]>
    Cc: Borislav Betkov <[email protected]>
    Cc: Christoph Lameter (Ampere) <[email protected]>
    Cc: Dennis Zhou <[email protected]>
    Cc: Dev Jain <[email protected]>
    Cc: Dmitriy Vyukov <[email protected]>
    Cc: Gwan-gyeong Mun <[email protected]>
    Cc: Ingo Molnar <[email protected]>
    Cc: Jane Chu <[email protected]>
    Cc: Joao Martins <[email protected]>
    Cc: Joerg Roedel <[email protected]>
    Cc: John Hubbard <[email protected]>
    Cc: Kevin Brodsky <[email protected]>
    Cc: Liam Howlett <[email protected]>
    Cc: Michal Hocko <[email protected]>
    Cc: Oscar Salvador <[email protected]>
    Cc: Peter Xu <[email protected]>
    Cc: Peter Zijlstra <[email protected]>
    Cc: Qi Zheng <[email protected]>
    Cc: Ryan Roberts <[email protected]>
    Cc: Suren Baghdasaryan <[email protected]>
    Cc: Tejun Heo <[email protected]>
    Cc: Thomas Gleinxer <[email protected]>
    Cc: Thomas Huth <[email protected]>
    Cc: "Uladzislau Rezki (Sony)" <[email protected]>
    Cc: Vincenzo Frascino <[email protected]>
    Cc: Vlastimil Babka <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    [ Adjust context ]
    Signed-off-by: Harry Yoo <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mptcp: sockopt: make sync_socket_options propagate SOCK_KEEPOPEN [+ + +]
Author: Krister Johansen <[email protected]>
Date:   Mon Sep 8 11:16:01 2025 -0700

    mptcp: sockopt: make sync_socket_options propagate SOCK_KEEPOPEN
    
    commit 648de37416b301f046f62f1b65715c7fa8ebaa67 upstream.
    
    Users reported a scenario where MPTCP connections that were configured
    with SO_KEEPALIVE prior to connect would fail to enable their keepalives
    if MTPCP fell back to TCP mode.
    
    After investigating, this affects keepalives for any connection where
    sync_socket_options is called on a socket that is in the closed or
    listening state.  Joins are handled properly. For connects,
    sync_socket_options is called when the socket is still in the closed
    state.  The tcp_set_keepalive() function does not act on sockets that
    are closed or listening, hence keepalive is not immediately enabled.
    Since the SO_KEEPOPEN flag is absent, it is not enabled later in the
    connect sequence via tcp_finish_connect.  Setting the keepalive via
    sockopt after connect does work, but would not address any subsequently
    created flows.
    
    Fortunately, the fix here is straight-forward: set SOCK_KEEPOPEN on the
    subflow when calling sync_socket_options.
    
    The fix was valdidated both by using tcpdump to observe keepalive
    packets not being sent before the fix, and being sent after the fix.  It
    was also possible to observe via ss that the keepalive timer was not
    enabled on these sockets before the fix, but was enabled afterwards.
    
    Fixes: 1b3e7ede1365 ("mptcp: setsockopt: handle SO_KEEPALIVE and SO_PRIORITY")
    Cc: [email protected]
    Signed-off-by: Krister Johansen <[email protected]>
    Reviewed-by: Geliang Tang <[email protected]>
    Reviewed-by: Matthieu Baerts (NGI0) <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mtd: nand: raw: atmel: Respect tAR, tCLR in read setup timing [+ + +]
Author: Alexander Sverdlin <[email protected]>
Date:   Thu Aug 21 14:00:57 2025 +0200

    mtd: nand: raw: atmel: Respect tAR, tCLR in read setup timing
    
    commit fd779eac2d659668be4d3dbdac0710afd5d6db12 upstream.
    
    Having setup time 0 violates tAR, tCLR of some chips, for instance
    TOSHIBA TC58NVG2S3ETAI0 cannot be detected successfully (first ID byte
    being read duplicated, i.e. 98 98 dc 90 15 76 14 03 instead of
    98 dc 90 15 76 ...).
    
    Atmel Application Notes postulated 1 cycle NRD_SETUP without explanation
    [1], but it looks more appropriate to just calculate setup time properly.
    
    [1] Link: https://ww1.microchip.com/downloads/aemDocuments/documents/MPU32/ApplicationNotes/ApplicationNotes/doc6255.pdf
    
    Cc: [email protected]
    Fixes: f9ce2eddf176 ("mtd: nand: atmel: Add ->setup_data_interface() hooks")
    Signed-off-by: Alexander Sverdlin <[email protected]>
    Tested-by: Alexander Dahl <[email protected]>
    Signed-off-by: Miquel Raynal <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

mtd: rawnand: stm32_fmc2: avoid overlapping mappings on ECC buffer [+ + +]
Author: Christophe Kerello <[email protected]>
Date:   Tue Aug 12 09:26:58 2025 +0200

    mtd: rawnand: stm32_fmc2: avoid overlapping mappings on ECC buffer
    
    commit 513c40e59d5a414ab763a9c84797534b5e8c208d upstream.
    
    Avoid below overlapping mappings by using a contiguous
    non-cacheable buffer.
    
    [    4.077708] DMA-API: stm32_fmc2_nfc 48810000.nand-controller: cacheline tracking EEXIST,
    overlapping mappings aren't supported
    [    4.089103] WARNING: CPU: 1 PID: 44 at kernel/dma/debug.c:568 add_dma_entry+0x23c/0x300
    [    4.097071] Modules linked in:
    [    4.100101] CPU: 1 PID: 44 Comm: kworker/u4:2 Not tainted 6.1.82 #1
    [    4.106346] Hardware name: STMicroelectronics STM32MP257F VALID1 SNOR / MB1704 (LPDDR4 Power discrete) + MB1703 + MB1708 (SNOR MB1730) (DT)
    [    4.118824] Workqueue: events_unbound deferred_probe_work_func
    [    4.124674] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [    4.131624] pc : add_dma_entry+0x23c/0x300
    [    4.135658] lr : add_dma_entry+0x23c/0x300
    [    4.139792] sp : ffff800009dbb490
    [    4.143016] x29: ffff800009dbb4a0 x28: 0000000004008022 x27: ffff8000098a6000
    [    4.150174] x26: 0000000000000000 x25: ffff8000099e7000 x24: ffff8000099e7de8
    [    4.157231] x23: 00000000ffffffff x22: 0000000000000000 x21: ffff8000098a6a20
    [    4.164388] x20: ffff000080964180 x19: ffff800009819ba0 x18: 0000000000000006
    [    4.171545] x17: 6361727420656e69 x16: 6c6568636163203a x15: 72656c6c6f72746e
    [    4.178602] x14: 6f632d646e616e2e x13: ffff800009832f58 x12: 00000000000004ec
    [    4.185759] x11: 00000000000001a4 x10: ffff80000988af58 x9 : ffff800009832f58
    [    4.192916] x8 : 00000000ffffefff x7 : ffff80000988af58 x6 : 80000000fffff000
    [    4.199972] x5 : 000000000000bff4 x4 : 0000000000000000 x3 : 0000000000000000
    [    4.207128] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff0000812d2c40
    [    4.214185] Call trace:
    [    4.216605]  add_dma_entry+0x23c/0x300
    [    4.220338]  debug_dma_map_sg+0x198/0x350
    [    4.224373]  __dma_map_sg_attrs+0xa0/0x110
    [    4.228411]  dma_map_sg_attrs+0x10/0x2c
    [    4.232247]  stm32_fmc2_nfc_xfer.isra.0+0x1c8/0x3fc
    [    4.237088]  stm32_fmc2_nfc_seq_read_page+0xc8/0x174
    [    4.242127]  nand_read_oob+0x1d4/0x8e0
    [    4.245861]  mtd_read_oob_std+0x58/0x84
    [    4.249596]  mtd_read_oob+0x90/0x150
    [    4.253231]  mtd_read+0x68/0xac
    
    Signed-off-by: Christophe Kerello <[email protected]>
    Cc: [email protected]
    Fixes: 2cd457f328c1 ("mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver")
    Signed-off-by: Miquel Raynal <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

mtd: rawnand: stm32_fmc2: fix ECC overwrite [+ + +]
Author: Christophe Kerello <[email protected]>
Date:   Tue Aug 12 09:30:08 2025 +0200

    mtd: rawnand: stm32_fmc2: fix ECC overwrite
    
    commit 811c0da4542df3c065f6cb843ced68780e27bb44 upstream.
    
    In case OOB write is requested during a data write, ECC is currently
    lost. Avoid this issue by only writing in the free spare area.
    This issue has been seen with a YAFFS2 file system.
    
    Signed-off-by: Christophe Kerello <[email protected]>
    Cc: [email protected]
    Fixes: 2cd457f328c1 ("mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver")
    Signed-off-by: Miquel Raynal <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

mtd: spinand: winbond: Fix oob_layout for W25N01JW [+ + +]
Author: Santhosh Kumar K <[email protected]>
Date:   Sat Sep 13 12:19:24 2025 -0400

    mtd: spinand: winbond: Fix oob_layout for W25N01JW
    
    [ Upstream commit 4550d33e18112a11a740424c4eec063cd58e918c ]
    
    Fix the W25N01JW's oob_layout according to the datasheet [1]
    
    [1] https://www.winbond.com/hq/product/code-storage-flash-memory/qspinand-flash/?__locale=en&partNo=W25N01JW
    
    Fixes: 6a804fb72de5 ("mtd: spinand: winbond: add support for serial NAND flash")
    Cc: Sridharan S N <[email protected]>
    Cc: [email protected]
    Signed-off-by: Santhosh Kumar K <[email protected]>
    Signed-off-by: Miquel Raynal <[email protected]>
    [ Adjust context ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
net/mlx5: HWS, change error flow on matcher disconnect [+ + +]
Author: Yevgeny Kliteynik <[email protected]>
Date:   Thu Jan 2 20:14:05 2025 +0200

    net/mlx5: HWS, change error flow on matcher disconnect
    
    commit 1ce840c7a659aa53a31ef49f0271b4fd0dc10296 upstream.
    
    Currently, when firmware failure occurs during matcher disconnect flow,
    the error flow of the function reconnects the matcher back and returns
    an error, which continues running the calling function and eventually
    frees the matcher that is being disconnected.
    This leads to a case where we have a freed matcher on the matchers list,
    which in turn leads to use-after-free and eventual crash.
    
    This patch fixes that by not trying to reconnect the matcher back when
    some FW command fails during disconnect.
    
    Note that we're dealing here with FW error. We can't overcome this
    problem. This might lead to bad steering state (e.g. wrong connection
    between matchers), and will also lead to resource leakage, as it is
    the case with any other error handling during resource destruction.
    
    However, the goal here is to allow the driver to continue and not crash
    the machine with use-after-free error.
    
    Signed-off-by: Yevgeny Kliteynik <[email protected]>
    Signed-off-by: Itamar Gozlan <[email protected]>
    Reviewed-by: Mark Bloch <[email protected]>
    Signed-off-by: Tariq Toukan <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Jan Alexander Preissler <[email protected]>
    Signed-off-by: Sujana Subramaniam <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
net: bridge: Bounce invalid boolopts [+ + +]
Author: Petr Machata <[email protected]>
Date:   Fri Sep 5 13:12:33 2025 +0200

    net: bridge: Bounce invalid boolopts
    
    [ Upstream commit 8625f5748fea960d2af4f3c3e9891ee8f6f80906 ]
    
    The bridge driver currently tolerates options that it does not recognize.
    Instead, it should bounce them.
    
    Fixes: a428afe82f98 ("net: bridge: add support for user-controlled bool options")
    Signed-off-by: Petr Machata <[email protected]>
    Reviewed-by: Ido Schimmel <[email protected]>
    Acked-by: Nikolay Aleksandrov <[email protected]>
    Link: https://patch.msgid.link/e6fdca3b5a8d54183fbda075daffef38bdd7ddce.1757070067.git.petrm@nvidia.com
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: fec: Fix possible NPD in fec_enet_phy_reset_after_clk_enable() [+ + +]
Author: Stefan Wahren <[email protected]>
Date:   Thu Sep 4 11:13:34 2025 +0200

    net: fec: Fix possible NPD in fec_enet_phy_reset_after_clk_enable()
    
    [ Upstream commit 03e79de4608bdd48ad6eec272e196124cefaf798 ]
    
    The function of_phy_find_device may return NULL, so we need to take
    care before dereferencing phy_dev.
    
    Fixes: 64a632da538a ("net: fec: Fix phy_device lookup for phy_reset_after_clk_enable()")
    Signed-off-by: Stefan Wahren <[email protected]>
    Cc: Christoph Niedermaier <[email protected]>
    Cc: Richard Leitner <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Reviewed-by: Wei Fang <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: hsr: Add VLAN CTAG filter support [+ + +]
Author: Murali Karicheri <[email protected]>
Date:   Wed Nov 6 14:47:08 2024 +0530

    net: hsr: Add VLAN CTAG filter support
    
    [ Upstream commit 1a8a63a5305e95519de6f941922dfcd8179f82e5 ]
    
    This patch adds support for VLAN ctag based filtering at slave devices.
    The slave ethernet device may be capable of filtering ethernet packets
    based on VLAN ID. This requires that when the VLAN interface is created
    over an HSR/PRP interface, it passes the VID information to the
    associated slave ethernet devices so that it updates the hardware
    filters to filter ethernet frames based on VID. This patch adds the
    required functions to propagate the vid information to the slave
    devices.
    
    Signed-off-by: Murali Karicheri <[email protected]>
    Signed-off-by: MD Danish Anwar <[email protected]>
    Reviewed-by: Jiri Pirko <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Stable-dep-of: 8884c6939913 ("hsr: use rtnl lock when iterating over ports")
    Signed-off-by: Sasha Levin <[email protected]>

net: mdiobus: release reset_gpio in mdiobus_unregister_device() [+ + +]
Author: Buday Csaba <[email protected]>
Date:   Thu Aug 7 15:54:49 2025 +0200

    net: mdiobus: release reset_gpio in mdiobus_unregister_device()
    
    commit 8ea25274ebaf2f6be8be374633b2ed8348ec0e70 upstream.
    
    reset_gpio is claimed in mdiobus_register_device(), but it is not
    released in mdiobus_unregister_device(). It is instead only
    released when the whole MDIO bus is unregistered.
    When a device uses the reset_gpio property, it becomes impossible
    to unregister it and register it again, because the GPIO remains
    claimed.
    This patch resolves that issue.
    
    Fixes: bafbdd527d56 ("phylib: Add device reset GPIO support") # see notes
    Reviewed-by: Andrew Lunn <[email protected]>
    Cc: Csókás Bence <[email protected]>
    [ csokas.bence: Resolve rebase conflict and clarify msg ]
    Signed-off-by: Buday Csaba <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    [ csokas.bence: Use the v1 patch on top of 6.12, as specified in notes ]
    Signed-off-by: Bence Csókás <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

net: usb: asix: ax88772: drop phylink use in PM to avoid MDIO runtime PM wakeups [+ + +]
Author: Oleksij Rempel <[email protected]>
Date:   Mon Sep 8 13:26:19 2025 +0200

    net: usb: asix: ax88772: drop phylink use in PM to avoid MDIO runtime PM wakeups
    
    commit 5537a4679403423e0b49c95b619983a4583d69c5 upstream.
    
    Drop phylink_{suspend,resume}() from ax88772 PM callbacks.
    
    MDIO bus accesses have their own runtime-PM handling and will try to
    wake the device if it is suspended. Such wake attempts must not happen
    from PM callbacks while the device PM lock is held. Since phylink
    {sus|re}sume may trigger MDIO, it must not be called in PM context.
    
    No extra phylink PM handling is required for this driver:
    - .ndo_open/.ndo_stop control the phylink start/stop lifecycle.
    - ethtool/phylib entry points run in process context, not PM.
    - phylink MAC ops program the MAC on link changes after resume.
    
    Fixes: e0bffe3e6894 ("net: asix: ax88772: migrate to phylink")
    Reported-by: Hubert Wiśniewski <[email protected]>
    Cc: [email protected]
    Signed-off-by: Oleksij Rempel <[email protected]>
    Tested-by: Hubert Wiśniewski <[email protected]>
    Tested-by: Xu Yang <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
netfilter: nf_tables: make nft_set_do_lookup available unconditionally [+ + +]
Author: Florian Westphal <[email protected]>
Date:   Wed Sep 10 10:02:21 2025 +0200

    netfilter: nf_tables: make nft_set_do_lookup available unconditionally
    
    [ Upstream commit 11fe5a82e53ac3581a80c88e0e35fb8a80e15f48 ]
    
    This function was added for retpoline mitigation and is replaced by a
    static inline helper if mitigations are not enabled.
    
    Enable this helper function unconditionally so next patch can add a lookup
    restart mechanism to fix possible false negatives while transactions are
    in progress.
    
    Adding lookup restarts in nft_lookup_eval doesn't work as nft_objref would
    then need the same copypaste loop.
    
    This patch is separate to ease review of the actual bug fix.
    
    Suggested-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Stable-dep-of: b2f742c846ca ("netfilter: nf_tables: restart set lookup on base_seq change")
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nf_tables: place base_seq in struct net [+ + +]
Author: Florian Westphal <[email protected]>
Date:   Wed Sep 10 10:02:20 2025 +0200

    netfilter: nf_tables: place base_seq in struct net
    
    [ Upstream commit 64102d9bbc3d41dac5188b8fba75b1344c438970 ]
    
    This will soon be read from packet path around same time as the gencursor.
    
    Both gencursor and base_seq get incremented almost at the same time, so
    it makes sense to place them in the same structure.
    
    This doesn't increase struct net size on 64bit due to padding.
    
    Signed-off-by: Florian Westphal <[email protected]>
    Stable-dep-of: b2f742c846ca ("netfilter: nf_tables: restart set lookup on base_seq change")
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nf_tables: Reintroduce shortened deletion notifications [+ + +]
Author: Phil Sutter <[email protected]>
Date:   Fri Jun 13 15:37:03 2025 +0200

    netfilter: nf_tables: Reintroduce shortened deletion notifications
    
    [ Upstream commit a1050dd071682d2c9d8d6d5c96119f8f401b62f0 ]
    
    Restore commit 28339b21a365 ("netfilter: nf_tables: do not send complete
    notification of deletions") and fix it:
    
    - Avoid upfront modification of 'event' variable so the conditionals
      become effective.
    - Always include NFTA_OBJ_TYPE attribute in object notifications, user
      space requires it for proper deserialisation.
    - Catch DESTROY events, too.
    
    Signed-off-by: Phil Sutter <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Stable-dep-of: b2f742c846ca ("netfilter: nf_tables: restart set lookup on base_seq change")
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nf_tables: restart set lookup on base_seq change [+ + +]
Author: Florian Westphal <[email protected]>
Date:   Wed Sep 10 10:02:22 2025 +0200

    netfilter: nf_tables: restart set lookup on base_seq change
    
    [ Upstream commit b2f742c846cab9afc5953a5d8f17b54922dcc723 ]
    
    The hash, hash_fast, rhash and bitwise sets may indicate no result even
    though a matching element exists during a short time window while other
    cpu is finalizing the transaction.
    
    This happens when the hash lookup/bitwise lookup function has picked up
    the old genbit, right before it was toggled by nf_tables_commit(), but
    then the same cpu managed to unlink the matching old element from the
    hash table:
    
    cpu0                                    cpu1
      has added new elements to clone
      has marked elements as being
      inactive in new generation
                                            perform lookup in the set
      enters commit phase:
                                            A) observes old genbit
       increments base_seq
    I) increments the genbit
    II) removes old element from the set
                                            B) finds matching element
                                            C) returns no match: found
                                            element is not valid in old
                                            generation
    
                                            Next lookup observes new genbit and
                                            finds matching e2.
    
    Consider a packet matching element e1, e2.
    
    cpu0 processes following transaction:
    1. remove e1
    2. adds e2, which has same key as e1.
    
    P matches both e1 and e2.  Therefore, cpu1 should always find a match
    for P. Due to above race, this is not the case:
    
    cpu1 observed the old genbit.  e2 will not be considered once it is found.
    The element e1 is not found anymore if cpu0 managed to unlink it from the
    hlist before cpu1 found it during list traversal.
    
    The situation only occurs for a brief time period, lookups happening
    after I) observe new genbit and return e2.
    
    This problem exists in all set types except nft_set_pipapo, so fix it once
    in nft_lookup rather than each set ops individually.
    
    Sample the base sequence counter, which gets incremented right before the
    genbit is changed.
    
    Then, if no match is found, retry the lookup if the base sequence was
    altered in between.
    
    If the base sequence hasn't changed:
     - No update took place: no-match result is expected.
       This is the common case.  or:
     - nf_tables_commit() hasn't progressed to genbit update yet.
       Old elements were still visible and nomatch result is expected, or:
     - nf_tables_commit updated the genbit:
       We picked up the new base_seq, so the lookup function also picked
       up the new genbit, no-match result is expected.
    
    If the old genbit was observed, then nft_lookup also picked up the old
    base_seq: nft_lookup_should_retry() returns true and relookup is performed
    in the new generation.
    
    This problem was added when the unconditional synchronize_rcu() call
    that followed the current/next generation bit toggle was removed.
    
    Thanks to Pablo Neira Ayuso for reviewing an earlier version of this
    patchset, for suggesting re-use of existing base_seq and placement of
    the restart loop in nft_set_do_lookup().
    
    Fixes: 0cbc06b3faba ("netfilter: nf_tables: remove synchronize_rcu in commit phase")
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nft_set: remove one argument from lookup and update functions [+ + +]
Author: Florian Westphal <[email protected]>
Date:   Wed Jul 9 19:05:13 2025 +0200

    netfilter: nft_set: remove one argument from lookup and update functions
    
    [ Upstream commit 17a20e09f086f2c574ac87f3cf6e14c4377f65f6 ]
    
    Return the extension pointer instead of passing it as a function
    argument to be filled in by the callee.
    
    As-is, whenever false is returned, the extension pointer is not used.
    
    For all set types, when true is returned, the extension pointer was set
    to the matching element.
    
    Only exception: nft_set_bitmap doesn't support extensions.
    Return a pointer to a static const empty element extension container.
    
    return false -> return NULL
    return true -> return the elements' extension pointer.
    
    This saves one function argument.
    
    Signed-off-by: Florian Westphal <[email protected]>
    Reviewed-by: Stefano Brivio <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Stable-dep-of: c4eaca2e1052 ("netfilter: nft_set_pipapo: don't check genbit from packetpath lookups")
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nft_set_pipapo: don't check genbit from packetpath lookups [+ + +]
Author: Florian Westphal <[email protected]>
Date:   Wed Sep 10 10:02:18 2025 +0200

    netfilter: nft_set_pipapo: don't check genbit from packetpath lookups
    
    [ Upstream commit c4eaca2e1052adfd67bed0a36a9d4b8e515666e4 ]
    
    The pipapo set type is special in that it has two copies of its
    datastructure: one live copy containing only valid elements and one
    on-demand clone used during transaction where adds/deletes happen.
    
    This clone is not visible to the datapath.
    
    This is unlike all other set types in nftables, those all link new
    elements into their live hlist/tree.
    
    For those sets, the lookup functions must skip the new elements while the
    transaction is ongoing to ensure consistency.
    
    As the clone is shallow, removal does have an effect on the packet path:
    once the transaction enters the commit phase the 'gencursor' bit that
    determines which elements are active and which elements should be ignored
    (because they are no longer valid) is flipped.
    
    This causes the datapath lookup to ignore these elements if they are found
    during lookup.
    
    This opens up a small race window where pipapo has an inconsistent view of
    the dataset from when the transaction-cpu flipped the genbit until the
    transaction-cpu calls nft_pipapo_commit() to swap live/clone pointers:
    
    cpu0                                    cpu1
      has added new elements to clone
      has marked elements as being
      inactive in new generation
                                            perform lookup in the set
      enters commit phase:
    
    I) increments the genbit
                                            A) observes new genbit
      removes elements from the clone so
      they won't be found anymore
                                            B) lookup in datastructure
                                               can't see new elements yet,
                                               but old elements are ignored
                                               -> Only matches elements that
                                               were not changed in the
                                               transaction
    II) calls nft_pipapo_commit(), clone
        and live pointers are swapped.
                                            C New nft_lookup happening now
                                              will find matching elements.
    
    Consider a packet matching range r1-r2:
    
    cpu0 processes following transaction:
    1. remove r1-r2
    2. add r1-r3
    
    P is contained in both ranges. Therefore, cpu1 should always find a match
    for P.  Due to above race, this is not the case:
    
    cpu1 does find r1-r2, but then ignores it due to the genbit indicating
    the range has been removed.
    
    At the same time, r1-r3 is not visible yet, because it can only be found
    in the clone.
    
    The situation persists for all lookups until after cpu0 hits II).
    
    The fix is easy: Don't check the genbit from pipapo lookup functions.
    This is possible because unlike the other set types, the new elements are
    not reachable from the live copy of the dataset.
    
    The clone/live pointer swap is enough to avoid matching on old elements
    while at the same time all new elements are exposed in one go.
    
    After this change, step B above returns a match in r1-r2.
    This is fine: r1-r2 only becomes truly invalid the moment they get freed.
    This happens after a synchronize_rcu() call and rcu read lock is held
    via netfilter hook traversal (nf_hook_slow()).
    
    Cc: Stefano Brivio <[email protected]>
    Fixes: 3c4287f62044 ("nf_tables: Add set type for arbitrary concatenation of ranges")
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nft_set_pipapo: don't return bogus extension pointer [+ + +]
Author: Florian Westphal <[email protected]>
Date:   Mon Aug 4 12:10:41 2025 +0200

    netfilter: nft_set_pipapo: don't return bogus extension pointer
    
    [ Upstream commit c8a7c2c608180f3b4e51dc958b3861242dcdd76d ]
    
    Dan Carpenter says:
    Commit 17a20e09f086 ("netfilter: nft_set: remove one argument from
    lookup and update functions") [..] leads to the following Smatch
    static checker warning:
    
     net/netfilter/nft_set_pipapo_avx2.c:1269 nft_pipapo_avx2_lookup()
     error: uninitialized symbol 'ext'.
    
    Fix this by initing ext to NULL and set it only once we've found
    a match.
    
    Fixes: 17a20e09f086 ("netfilter: nft_set: remove one argument from lookup and update functions")
    Reported-by: Dan Carpenter <[email protected]>
    Closes: https://lore.kernel.org/netfilter-devel/[email protected]/
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Stable-dep-of: c4eaca2e1052 ("netfilter: nft_set_pipapo: don't check genbit from packetpath lookups")
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nft_set_pipapo: fix null deref for empty set [+ + +]
Author: Florian Westphal <[email protected]>
Date:   Mon Aug 11 12:26:10 2025 +0200

    netfilter: nft_set_pipapo: fix null deref for empty set
    
    commit 30c1d25b9870d551be42535067d5481668b5e6f3 upstream.
    
    Blamed commit broke the check for a null scratch map:
      -  if (unlikely(!m || !*raw_cpu_ptr(m->scratch)))
      +  if (unlikely(!raw_cpu_ptr(m->scratch)))
    
    This should have been "if (!*raw_ ...)".
    Use the pattern of the avx2 version which is more readable.
    
    This can only be reproduced if avx2 support isn't available.
    
    Fixes: d8d871a35ca9 ("netfilter: nft_set_pipapo: merge pipapo_get/lookup")
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

netfilter: nft_set_pipapo: merge pipapo_get/lookup [+ + +]
Author: Florian Westphal <[email protected]>
Date:   Wed Jul 9 19:05:15 2025 +0200

    netfilter: nft_set_pipapo: merge pipapo_get/lookup
    
    [ Upstream commit d8d871a35ca9ee4881d34995444ed1cb826d01db ]
    
    The matching algorithm has implemented thrice:
    1. data path lookup, generic version
    2. data path lookup, avx2 version
    3. control plane lookup
    
    Merge 1 and 3 by refactoring pipapo_get as a common helper, then make
    nft_pipapo_lookup and nft_pipapo_get both call the common helper.
    
    Aside from the code savings this has the benefit that we no longer allocate
    temporary scratch maps for each control plane get and insertion operation.
    
    Signed-off-by: Florian Westphal <[email protected]>
    Reviewed-by: Stefano Brivio <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Stable-dep-of: c4eaca2e1052 ("netfilter: nft_set_pipapo: don't check genbit from packetpath lookups")
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nft_set_pipapo: remove unused arguments [+ + +]
Author: Florian Westphal <[email protected]>
Date:   Wed Jul 9 19:05:12 2025 +0200

    netfilter: nft_set_pipapo: remove unused arguments
    
    [ Upstream commit 7792c1e03054440c60d4bce0c06a31c134601997 ]
    
    They are not used anymore, so remove them.
    
    Signed-off-by: Florian Westphal <[email protected]>
    Reviewed-by: Stefano Brivio <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Stable-dep-of: c4eaca2e1052 ("netfilter: nft_set_pipapo: don't check genbit from packetpath lookups")
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nft_set_rbtree: continue traversal if element is inactive [+ + +]
Author: Florian Westphal <[email protected]>
Date:   Wed Sep 10 10:02:19 2025 +0200

    netfilter: nft_set_rbtree: continue traversal if element is inactive
    
    [ Upstream commit a60f7bf4a1524d8896b76ba89623080aebf44272 ]
    
    When the rbtree lookup function finds a match in the rbtree, it sets the
    range start interval to a potentially inactive element.
    
    Then, after tree lookup, if the matching element is inactive, it returns
    NULL and suppresses a matching result.
    
    This is wrong and leads to false negative matches when a transaction has
    already entered the commit phase.
    
    cpu0                                    cpu1
      has added new elements to clone
      has marked elements as being
      inactive in new generation
                                            perform lookup in the set
      enters commit phase:
    I) increments the genbit
                                            A) observes new genbit
                                            B) finds matching range
                                            C) returns no match: found
                                            range invalid in new generation
    II) removes old elements from the tree
                                            C New nft_lookup happening now
                                              will find matching element,
                                              because it is no longer
                                              obscured by old, inactive one.
    
    Consider a packet matching range r1-r2:
    
    cpu0 processes following transaction:
    1. remove r1-r2
    2. add r1-r3
    
    P is contained in both ranges. Therefore, cpu1 should always find a match
    for P.  Due to above race, this is not the case:
    
    cpu1 does find r1-r2, but then ignores it due to the genbit indicating
    the range has been removed.  It does NOT test for further matches.
    
    The situation persists for all lookups until after cpu0 hits II) after
    which r1-r3 range start node is tested for the first time.
    
    Move the "interval start is valid" check ahead so that tree traversal
    continues if the starting interval is not valid in this generation.
    
    Thanks to Stefan Hanreich for providing an initial reproducer for this
    bug.
    
    Reported-by: Stefan Hanreich <[email protected]>
    Fixes: c1eda3c6394f ("netfilter: nft_rbtree: ignore inactive matching element with no descendants")
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
netlink: specs: mptcp: add missing 'server-side' attr [+ + +]
Author: Matthieu Baerts (NGI0) <[email protected]>
Date:   Sat Sep 13 10:10:23 2025 -0400

    netlink: specs: mptcp: add missing 'server-side' attr
    
    [ Upstream commit 6b830c6a023ff6e8fe05dbe47a9e5cd276df09ee ]
    
    This attribute is added with the 'created' and 'established' events, but
    the documentation didn't mention it.
    
    The documentation in the UAPI header has been auto-generated by:
    
      ./tools/net/ynl/ynl-regen.sh
    
    Reviewed-by: Geliang Tang <[email protected]>
    Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
    Link: https://patch.msgid.link/20241221-net-mptcp-netlink-specs-pm-doc-fixes-v2-1-e54f2db3f844@kernel.org
    Signed-off-by: Jakub Kicinski <[email protected]>
    Stable-dep-of: 7094b84863e5 ("netlink: specs: mptcp: fix if-idx attribute type")
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

netlink: specs: mptcp: clearly mention attributes [+ + +]
Author: Matthieu Baerts (NGI0) <[email protected]>
Date:   Sat Sep 13 10:10:24 2025 -0400

    netlink: specs: mptcp: clearly mention attributes
    
    [ Upstream commit bea87657b5ee8e6f18af2833ee4b88212ef52d28 ]
    
    The rendered version of the MPTCP events [1] looked strange, because the
    whole content of the 'doc' was displayed in the same block.
    
    It was then not clear that the first words, not even ended by a period,
    were the attributes that are defined when such events are emitted. These
    attributes have now been moved to the end, prefixed by 'Attributes:' and
    ended with a period. Note that '>-' has been added after 'doc:' to allow
    ':' in the text below.
    
    The documentation in the UAPI header has been auto-generated by:
    
      ./tools/net/ynl/ynl-regen.sh
    
    Link: https://docs.kernel.org/networking/netlink_spec/mptcp_pm.html#event-type [1]
    Reviewed-by: Geliang Tang <[email protected]>
    Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
    Link: https://patch.msgid.link/20241221-net-mptcp-netlink-specs-pm-doc-fixes-v2-2-e54f2db3f844@kernel.org
    Signed-off-by: Jakub Kicinski <[email protected]>
    Stable-dep-of: 7094b84863e5 ("netlink: specs: mptcp: fix if-idx attribute type")
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

netlink: specs: mptcp: fix if-idx attribute type [+ + +]
Author: Matthieu Baerts (NGI0) <[email protected]>
Date:   Sat Sep 13 10:10:26 2025 -0400

    netlink: specs: mptcp: fix if-idx attribute type
    
    [ Upstream commit 7094b84863e5832cb1cd9c4b9d648904775b6bd9 ]
    
    This attribute is used as a signed number in the code in pm_netlink.c:
    
      nla_put_s32(skb, MPTCP_ATTR_IF_IDX, ssk->sk_bound_dev_if))
    
    The specs should then reflect that. Note that other 'if-idx' attributes
    from the same .yaml file use a signed number as well.
    
    Fixes: bc8aeb2045e2 ("Documentation: netlink: add a YAML spec for mptcp")
    Cc: [email protected]
    Reviewed-by: Geliang Tang <[email protected]>
    Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
    Link: https://patch.msgid.link/20250908-net-mptcp-misc-fixes-6-17-rc5-v1-1-5f2168a66079@kernel.org
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

netlink: specs: mptcp: replace underscores with dashes in names [+ + +]
Author: Jakub Kicinski <[email protected]>
Date:   Sat Sep 13 10:10:25 2025 -0400

    netlink: specs: mptcp: replace underscores with dashes in names
    
    [ Upstream commit 9e6dd4c256d0774701637b958ba682eff4991277 ]
    
    We're trying to add a strict regexp for the name format in the spec.
    Underscores will not be allowed, dashes should be used instead.
    This makes no difference to C (codegen, if used, replaces special
    chars in names) but it gives more uniform naming in Python.
    
    Fixes: bc8aeb2045e2 ("Documentation: netlink: add a YAML spec for mptcp")
    Reviewed-by: Davide Caratti <[email protected]>
    Reviewed-by: Donald Hunter <[email protected]>
    Reviewed-by: Matthieu Baerts (NGI0) <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Stable-dep-of: 7094b84863e5 ("netlink: specs: mptcp: fix if-idx attribute type")
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
nfs/localio: add direct IO enablement with sync and async IO support [+ + +]
Author: Mike Snitzer <[email protected]>
Date:   Fri Nov 15 20:40:53 2024 -0500

    nfs/localio: add direct IO enablement with sync and async IO support
    
    [ Upstream commit 3feec68563dda59517f83d19123aa287a1dfd068 ]
    
    This commit simply adds the required O_DIRECT plumbing.  It doesn't
    address the fact that NFS doesn't ensure all writes are page aligned
    (nor device logical block size aligned as required by O_DIRECT).
    
    Because NFS will read-modify-write for IO that isn't aligned, LOCALIO
    will not use O_DIRECT semantics by default if/when an application
    requests the use of O_DIRECT.  Allow the use of O_DIRECT semantics by:
    1: Adding a flag to the nfs_pgio_header struct to allow the NFS
       O_DIRECT layer to signal that O_DIRECT was used by the application
    2: Adding a 'localio_O_DIRECT_semantics' NFS module parameter that
       when enabled will cause LOCALIO to use O_DIRECT semantics (this may
       cause IO to fail if applications do not properly align their IO).
    
    This commit is derived from code developed by Weston Andros Adamson.
    
    Signed-off-by: Mike Snitzer <[email protected]>
    Reviewed-by: Jeff Layton <[email protected]>
    Signed-off-by: Anna Schumaker <[email protected]>
    Stable-dep-of: 992203a1fba5 ("nfs/localio: restore creds before releasing pageio data")
    Signed-off-by: Sasha Levin <[email protected]>

nfs/localio: remove extra indirect nfs_to call to check {read,write}_iter [+ + +]
Author: Mike Snitzer <[email protected]>
Date:   Thu Oct 3 15:35:03 2024 -0400

    nfs/localio: remove extra indirect nfs_to call to check {read,write}_iter
    
    [ Upstream commit 0978e5b85fc0867f53c5f4e5b7d2a5536a623e16 ]
    
    Push the read_iter and write_iter availability checks down to
    nfs_do_local_read and nfs_do_local_write respectively.
    
    This eliminates a redundant nfs_to->nfsd_file_file() call.
    
    Signed-off-by: Mike Snitzer <[email protected]>
    Signed-off-by: Trond Myklebust <[email protected]>
    Stable-dep-of: 992203a1fba5 ("nfs/localio: restore creds before releasing pageio data")
    Signed-off-by: Sasha Levin <[email protected]>

nfs/localio: restore creds before releasing pageio data [+ + +]
Author: Scott Mayhew <[email protected]>
Date:   Thu Aug 7 12:49:38 2025 -0400

    nfs/localio: restore creds before releasing pageio data
    
    [ Upstream commit 992203a1fba51b025c60ec0c8b0d9223343dea95 ]
    
    Otherwise if the nfsd filecache code releases the nfsd_file
    immediately, it can trigger the BUG_ON(cred == current->cred) in
    __put_cred() when it puts the nfsd_file->nf_file->f-cred.
    
    Fixes: b9f5dd57f4a5 ("nfs/localio: use dedicated workqueues for filesystem read and write")
    Signed-off-by: Scott Mayhew <[email protected]>
    Reviewed-by: Mike Snitzer <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
NFS: nfs_invalidate_folio() must observe the offset and size arguments [+ + +]
Author: Trond Myklebust <[email protected]>
Date:   Wed Sep 3 11:48:57 2025 -0400

    NFS: nfs_invalidate_folio() must observe the offset and size arguments
    
    [ Upstream commit b7b8574225e9d2b5f1fb5483886ab797892f43b5 ]
    
    If we're truncating part of the folio, then we need to write out the
    data on the part that is not covered by the cancellation.
    
    Fixes: d47992f86b30 ("mm: change invalidatepage prototype to accept length")
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

NFS: Serialise O_DIRECT i/o and truncate() [+ + +]
Author: Trond Myklebust <[email protected]>
Date:   Fri Sep 5 12:06:23 2025 -0400

    NFS: Serialise O_DIRECT i/o and truncate()
    
    [ Upstream commit 9eb90f435415c7da4800974ed943e39b5578ee7f ]
    
    Ensure that all O_DIRECT reads and writes are complete, and prevent the
    initiation of new i/o until the setattr operation that will truncate the
    file is complete.
    
    Fixes: a5864c999de6 ("NFS: Do not serialise O_DIRECT reads and writes")
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
NFSv4.2: Serialise O_DIRECT i/o and clone range [+ + +]
Author: Trond Myklebust <[email protected]>
Date:   Sat Sep 6 10:40:24 2025 -0400

    NFSv4.2: Serialise O_DIRECT i/o and clone range
    
    [ Upstream commit c80ebeba1198eac8811ab0dba36ecc13d51e4438 ]
    
    Ensure that all O_DIRECT reads and writes complete before cloning a file
    range, so that both the source and destination are up to date.
    
    Fixes: a5864c999de6 ("NFS: Do not serialise O_DIRECT reads and writes")
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

NFSv4.2: Serialise O_DIRECT i/o and copy range [+ + +]
Author: Trond Myklebust <[email protected]>
Date:   Sat Sep 6 10:54:13 2025 -0400

    NFSv4.2: Serialise O_DIRECT i/o and copy range
    
    [ Upstream commit ca247c89900ae90207f4d321e260cd93b7c7d104 ]
    
    Ensure that all O_DIRECT reads and writes complete before copying a file
    range, so that the destination is up to date.
    
    Fixes: a5864c999de6 ("NFS: Do not serialise O_DIRECT reads and writes")
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

NFSv4.2: Serialise O_DIRECT i/o and fallocate() [+ + +]
Author: Trond Myklebust <[email protected]>
Date:   Fri Sep 5 12:11:17 2025 -0400

    NFSv4.2: Serialise O_DIRECT i/o and fallocate()
    
    [ Upstream commit b93128f29733af5d427a335978a19884c2c230e2 ]
    
    Ensure that all O_DIRECT reads and writes complete before calling
    fallocate so that we don't race w.r.t. attribute updates.
    
    Fixes: 99f237832243 ("NFSv4.2: Always flush out writes in nfs42_proc_fallocate()")
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
NFSv4/flexfiles: Fix layout merge mirror check. [+ + +]
Author: Jonathan Curley <[email protected]>
Date:   Mon Sep 8 17:35:16 2025 +0000

    NFSv4/flexfiles: Fix layout merge mirror check.
    
    [ Upstream commit dd2fa82473453661d12723c46c9f43d9876a7efd ]
    
    Typo in ff_lseg_match_mirrors makes the diff ineffective. This results
    in merge happening all the time. Merge happening all the time is
    problematic because it marks lsegs invalid. Marking lsegs invalid
    causes all outstanding IO to get restarted with EAGAIN and connections
    to get closed.
    
    Closing connections constantly triggers race conditions in the RDMA
    implementation...
    
    Fixes: 660d1eb22301c ("pNFS/flexfile: Don't merge layout segments if the mirrors don't match")
    Signed-off-by: Jonathan Curley <[email protected]>
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
NFSv4: Clear NFS_CAP_OPEN_XOR and NFS_CAP_DELEGTIME if not supported [+ + +]
Author: Trond Myklebust <[email protected]>
Date:   Fri Aug 29 09:12:30 2025 -0700

    NFSv4: Clear NFS_CAP_OPEN_XOR and NFS_CAP_DELEGTIME if not supported
    
    [ Upstream commit b3ac33436030bce37ecb3dcae581ecfaad28078c ]
    
    _nfs4_server_capabilities() should clear capabilities that are not
    supported by the server.
    
    Fixes: d2a00cceb93a ("NFSv4: Detect support for OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION")
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

NFSv4: Clear the NFS_CAP_FS_LOCATIONS flag if it is not set [+ + +]
Author: Trond Myklebust <[email protected]>
Date:   Fri Aug 29 09:07:22 2025 -0700

    NFSv4: Clear the NFS_CAP_FS_LOCATIONS flag if it is not set
    
    [ Upstream commit dd5a8621b886b02f8341c5d4ea68eb2c552ebd3e ]
    
    _nfs4_server_capabilities() is expected to clear any flags that are not
    supported by the server.
    
    Fixes: 8a59bb93b7e3 ("NFSv4 store server support for fs_location attribute")
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

NFSv4: Clear the NFS_CAP_XATTR flag if not supported by the server [+ + +]
Author: Trond Myklebust <[email protected]>
Date:   Fri Aug 29 09:15:12 2025 -0700

    NFSv4: Clear the NFS_CAP_XATTR flag if not supported by the server
    
    [ Upstream commit 4fb2b677fc1f70ee642c0beecc3cabf226ef5707 ]
    
    nfs_server_set_fsinfo() shouldn't assume that NFS_CAP_XATTR is unset
    on entry to the function.
    
    Fixes: b78ef845c35d ("NFSv4.2: query the server for extended attribute support")
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

NFSv4: Don't clear capabilities that won't be reset [+ + +]
Author: Trond Myklebust <[email protected]>
Date:   Fri Aug 29 09:02:16 2025 -0700

    NFSv4: Don't clear capabilities that won't be reset
    
    [ Upstream commit 31f1a960ad1a14def94fa0b8c25d62b4c032813f ]
    
    Don't clear the capabilities that are not going to get reset by the call
    to _nfs4_server_capabilities().
    
    Reported-by: Scott Haiden <[email protected]>
    Fixes: b01f21cacde9 ("NFS: Fix the setting of capabilities when automounting a new filesystem")
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
nvme-pci: skip nvme_write_sq_db on empty rqlist [+ + +]
Author: Maurizio Lombardi <[email protected]>
Date:   Mon Mar 31 18:28:59 2025 +0200

    nvme-pci: skip nvme_write_sq_db on empty rqlist
    
    [ Upstream commit 288ff0d10beb069355036355d5f7612579dc869c ]
    
    nvme_submit_cmds() should check the rqlist before calling
    nvme_write_sq_db(); if the list is empty, it must return immediately.
    
    Fixes: beadf0088501 ("nvme-pci: reverse request order in nvme_queue_rqs")
    Signed-off-by: Maurizio Lombardi <[email protected]>
    Signed-off-by: Keith Busch <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
ocfs2: fix recursive semaphore deadlock in fiemap call [+ + +]
Author: Mark Tinguely <[email protected]>
Date:   Fri Aug 29 10:18:15 2025 -0500

    ocfs2: fix recursive semaphore deadlock in fiemap call
    
    commit 04100f775c2ea501927f508f17ad824ad1f23c8d upstream.
    
    syzbot detected a OCFS2 hang due to a recursive semaphore on a
    FS_IOC_FIEMAP of the extent list on a specially crafted mmap file.
    
    context_switch kernel/sched/core.c:5357 [inline]
       __schedule+0x1798/0x4cc0 kernel/sched/core.c:6961
       __schedule_loop kernel/sched/core.c:7043 [inline]
       schedule+0x165/0x360 kernel/sched/core.c:7058
       schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:7115
       rwsem_down_write_slowpath+0x872/0xfe0 kernel/locking/rwsem.c:1185
       __down_write_common kernel/locking/rwsem.c:1317 [inline]
       __down_write kernel/locking/rwsem.c:1326 [inline]
       down_write+0x1ab/0x1f0 kernel/locking/rwsem.c:1591
       ocfs2_page_mkwrite+0x2ff/0xc40 fs/ocfs2/mmap.c:142
       do_page_mkwrite+0x14d/0x310 mm/memory.c:3361
       wp_page_shared mm/memory.c:3762 [inline]
       do_wp_page+0x268d/0x5800 mm/memory.c:3981
       handle_pte_fault mm/memory.c:6068 [inline]
       __handle_mm_fault+0x1033/0x5440 mm/memory.c:6195
       handle_mm_fault+0x40a/0x8e0 mm/memory.c:6364
       do_user_addr_fault+0x764/0x1390 arch/x86/mm/fault.c:1387
       handle_page_fault arch/x86/mm/fault.c:1476 [inline]
       exc_page_fault+0x76/0xf0 arch/x86/mm/fault.c:1532
       asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
    RIP: 0010:copy_user_generic arch/x86/include/asm/uaccess_64.h:126 [inline]
    RIP: 0010:raw_copy_to_user arch/x86/include/asm/uaccess_64.h:147 [inline]
    RIP: 0010:_inline_copy_to_user include/linux/uaccess.h:197 [inline]
    RIP: 0010:_copy_to_user+0x85/0xb0 lib/usercopy.c:26
    Code: e8 00 bc f7 fc 4d 39 fc 72 3d 4d 39 ec 77 38 e8 91 b9 f7 fc 4c 89
    f7 89 de e8 47 25 5b fd 0f 01 cb 4c 89 ff 48 89 d9 4c 89 f6 <f3> a4 0f
    1f 00 48 89 cb 0f 01 ca 48 89 d8 5b 41 5c 41 5d 41 5e 41
    RSP: 0018:ffffc9000403f950 EFLAGS: 00050256
    RAX: ffffffff84c7f101 RBX: 0000000000000038 RCX: 0000000000000038
    RDX: 0000000000000000 RSI: ffffc9000403f9e0 RDI: 0000200000000060
    RBP: ffffc9000403fa90 R08: ffffc9000403fa17 R09: 1ffff92000807f42
    R10: dffffc0000000000 R11: fffff52000807f43 R12: 0000200000000098
    R13: 00007ffffffff000 R14: ffffc9000403f9e0 R15: 0000200000000060
       copy_to_user include/linux/uaccess.h:225 [inline]
       fiemap_fill_next_extent+0x1c0/0x390 fs/ioctl.c:145
       ocfs2_fiemap+0x888/0xc90 fs/ocfs2/extent_map.c:806
       ioctl_fiemap fs/ioctl.c:220 [inline]
       do_vfs_ioctl+0x1173/0x1430 fs/ioctl.c:532
       __do_sys_ioctl fs/ioctl.c:596 [inline]
       __se_sys_ioctl+0x82/0x170 fs/ioctl.c:584
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x77/0x7f
    RIP: 0033:0x7f5f13850fd9
    RSP: 002b:00007ffe3b3518b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
    RAX: ffffffffffffffda RBX: 0000200000000000 RCX: 00007f5f13850fd9
    RDX: 0000200000000040 RSI: 00000000c020660b RDI: 0000000000000004
    RBP: 6165627472616568 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe3b3518f0
    R13: 00007ffe3b351b18 R14: 431bde82d7b634db R15: 00007f5f1389a03b
    
    ocfs2_fiemap() takes a read lock of the ip_alloc_sem semaphore (since
    v2.6.22-527-g7307de80510a) and calls fiemap_fill_next_extent() to read the
    extent list of this running mmap executable.  The user supplied buffer to
    hold the fiemap information page faults calling ocfs2_page_mkwrite() which
    will take a write lock (since v2.6.27-38-g00dc417fa3e7) of the same
    semaphore.  This recursive semaphore will hold filesystem locks and causes
    a hang of the fileystem.
    
    The ip_alloc_sem protects the inode extent list and size.  Release the
    read semphore before calling fiemap_fill_next_extent() in ocfs2_fiemap()
    and ocfs2_fiemap_inline().  This does an unnecessary semaphore lock/unlock
    on the last extent but simplifies the error path.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 00dc417fa3e7 ("ocfs2: fiemap support")
    Signed-off-by: Mark Tinguely <[email protected]>
    Reported-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?extid=541dcc6ee768f77103e7
    Reviewed-by: Joseph Qi <[email protected]>
    Cc: Mark Fasheh <[email protected]>
    Cc: Joel Becker <[email protected]>
    Cc: Junxiao Bi <[email protected]>
    Cc: Changwei Ge <[email protected]>
    Cc: Jun Piao <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
phy: qualcomm: phy-qcom-eusb2-repeater: fix override properties [+ + +]
Author: Pengyu Luo <[email protected]>
Date:   Tue Aug 12 17:39:56 2025 +0800

    phy: qualcomm: phy-qcom-eusb2-repeater: fix override properties
    
    [ Upstream commit 942e47ab228c7dd27c2ae043c17e7aab2028082c ]
    
    property "qcom,tune-usb2-preem" is for EUSB2_TUNE_USB2_PREEM
    property "qcom,tune-usb2-amplitude" is for EUSB2_TUNE_IUSB2
    
    The downstream correspondence is as follows:
    EUSB2_TUNE_USB2_PREEM: Tx pre-emphasis tuning
    EUSB2_TUNE_IUSB2: HS trasmit amplitude
    EUSB2_TUNE_SQUELCH_U: Squelch detection threshold
    EUSB2_TUNE_HSDISC: HS disconnect threshold
    EUSB2_TUNE_EUSB_SLEW: slew rate
    
    Fixes: 31bc94de7602 ("phy: qualcomm: phy-qcom-eusb2-repeater: Don't zero-out registers")
    Signed-off-by: Pengyu Luo <[email protected]>
    Reviewed-by: Konrad Dybcio <[email protected]>
    Reviewed-by: Luca Weiss <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

phy: tegra: xusb: fix device and OF node leak at probe [+ + +]
Author: Johan Hovold <[email protected]>
Date:   Thu Jul 24 15:12:04 2025 +0200

    phy: tegra: xusb: fix device and OF node leak at probe
    
    commit bca065733afd1e3a89a02f05ffe14e966cd5f78e upstream.
    
    Make sure to drop the references taken to the PMC OF node and device by
    of_parse_phandle() and of_find_device_by_node() during probe.
    
    Note the holding a reference to the PMC device does not prevent the
    PMC regmap from going away (e.g. if the PMC driver is unbound) so there
    is no need to keep the reference.
    
    Fixes: 2d1021487273 ("phy: tegra: xusb: Add wake/sleepwalk for Tegra210")
    Cc: [email protected]      # 5.14
    Cc: JC Kuo <[email protected]>
    Signed-off-by: Johan Hovold <[email protected]>
    Reviewed-by: Neil Armstrong <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

phy: ti-pipe3: fix device leak at unbind [+ + +]
Author: Johan Hovold <[email protected]>
Date:   Thu Jul 24 15:12:06 2025 +0200

    phy: ti-pipe3: fix device leak at unbind
    
    commit e19bcea99749ce8e8f1d359f68ae03210694ad56 upstream.
    
    Make sure to drop the reference to the control device taken by
    of_find_device_by_node() during probe when the driver is unbound.
    
    Fixes: 918ee0d21ba4 ("usb: phy: omap-usb3: Don't use omap_get_control_dev()")
    Cc: [email protected]      # 3.13
    Cc: Roger Quadros <[email protected]>
    Signed-off-by: Johan Hovold <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

phy: ti: omap-usb2: fix device leak at unbind [+ + +]
Author: Johan Hovold <[email protected]>
Date:   Thu Jul 24 15:12:05 2025 +0200

    phy: ti: omap-usb2: fix device leak at unbind
    
    commit 64961557efa1b98f375c0579779e7eeda1a02c42 upstream.
    
    Make sure to drop the reference to the control device taken by
    of_find_device_by_node() during probe when the driver is unbound.
    
    Fixes: 478b6c7436c2 ("usb: phy: omap-usb2: Don't use omap_get_control_dev()")
    Cc: [email protected]      # 3.13
    Cc: Roger Quadros <[email protected]>
    Signed-off-by: Johan Hovold <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
proc: fix type confusion in pde_set_flags() [+ + +]
Author: wangzijie <[email protected]>
Date:   Thu Sep 4 21:57:15 2025 +0800

    proc: fix type confusion in pde_set_flags()
    
    [ Upstream commit 0ce9398aa0830f15f92bbed73853f9861c3e74ff ]
    
    Commit 2ce3d282bd50 ("proc: fix missing pde_set_flags() for net proc
    files") missed a key part in the definition of proc_dir_entry:
    
    union {
            const struct proc_ops *proc_ops;
            const struct file_operations *proc_dir_ops;
    };
    
    So dereference of ->proc_ops assumes it is a proc_ops structure results in
    type confusion and make NULL check for 'proc_ops' not work for proc dir.
    
    Add !S_ISDIR(dp->mode) test before calling pde_set_flags() to fix it.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 2ce3d282bd50 ("proc: fix missing pde_set_flags() for net proc files")
    Signed-off-by: wangzijie <[email protected]>
    Reported-by: Brad Spengler <[email protected]>
    Closes: https://lore.kernel.org/all/[email protected]/
    Cc: Alexey Dobriyan <[email protected]>
    Cc: Al Viro <[email protected]>
    Cc: Christian Brauner <[email protected]>
    Cc: Jiri Slaby <[email protected]>
    Cc: Stefano Brivio <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
regulator: sy7636a: fix lifecycle of power good gpio [+ + +]
Author: Andreas Kemnade <[email protected]>
Date:   Sat Sep 6 11:09:13 2025 +0200

    regulator: sy7636a: fix lifecycle of power good gpio
    
    [ Upstream commit c05d0b32eebadc8be6e53196e99c64cf2bed1d99 ]
    
    Attach the power good gpio to the regulator device devres instead of the
    parent device to fix problems if probe is run multiple times
    (rmmod/insmod or some deferral).
    
    Fixes: 8c485bedfb785 ("regulator: sy7636a: Initial commit")
    Signed-off-by: Andreas Kemnade <[email protected]>
    Reviewed-by: Alistair Francis <[email protected]>
    Reviewed-by: Peng Fan <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
Revert "drm/amd/display: Optimize cursor position updates" [+ + +]
Author: Aurabindo Pillai <[email protected]>
Date:   Thu Jan 2 13:12:24 2025 -0500

    Revert "drm/amd/display: Optimize cursor position updates"
    
    [ Upstream commit a5d258a00b41143d9c64880eed35799d093c4782 ]
    
    This reverts commit 88c7c56d07c108ed4de319c8dba44aa4b8a38dd1.
    
    SW and HW state are not always matching in some cases causing cursor to
    be disabled.
    
    Signed-off-by: Aurabindo Pillai <[email protected]>
    Reviewed-by: Leo Li <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
Revert "net: usb: asix: ax88772: drop phylink use in PM to avoid MDIO runtime PM wakeups" [+ + +]
Author: Paolo Abeni <[email protected]>
Date:   Thu Sep 11 16:33:31 2025 +0200

    Revert "net: usb: asix: ax88772: drop phylink use in PM to avoid MDIO runtime PM wakeups"
    
    commit 63a796558bc22ec699e4193d5c75534757ddf2e6 upstream.
    
    This reverts commit 5537a4679403 ("net: usb: asix: ax88772: drop
    phylink use in PM to avoid MDIO runtime PM wakeups"), it breaks
    operation of asix ethernet usb dongle after system suspend-resume
    cycle.
    
    Link: https://lore.kernel.org/all/[email protected]/
    Fixes: 5537a4679403 ("net: usb: asix: ax88772: drop phylink use in PM to avoid MDIO runtime PM wakeups")
    Reported-by: Marek Szyprowski <[email protected]>
    Acked-by: Jakub Kicinski <[email protected]>
    Link: https://patch.msgid.link/2945b9dbadb8ee1fee058b19554a5cb14f1763c1.1757601118.git.pabeni@redhat.com
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
Revert "SUNRPC: Don't allow waiting for exiting tasks" [+ + +]
Author: Trond Myklebust <[email protected]>
Date:   Wed Sep 3 09:49:33 2025 -0400

    Revert "SUNRPC: Don't allow waiting for exiting tasks"
    
    commit 199cd9e8d14bc14bdbd1fa3031ce26dac9781507 upstream.
    
    This reverts commit 14e41b16e8cb677bb440dca2edba8b041646c742.
    
    This patch breaks the LTP acct02 test, so let's revert and look for a
    better solution.
    
    Reported-by: Mark Brown <[email protected]>
    Reported-by: Harshvardhan Jha <[email protected]>
    Link: https://lore.kernel.org/linux-nfs/[email protected]/
    Cc: [email protected] # 6.15.x
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
Revert "udmabuf: fix vmap_udmabuf error page set" [+ + +]
Author: Huan Yang <[email protected]>
Date:   Mon Apr 28 15:38:29 2025 +0800

    Revert "udmabuf: fix vmap_udmabuf error page set"
    
    [ Upstream commit ceb7b62eaaaacfcf87473bd2e99ac73a758620cb ]
    
    This reverts commit 18d7de823b7150344d242c3677e65d68c5271b04.
    
    We cannot use vmap_pfn() in vmap_udmabuf() as it would fail the pfn_valid()
    check in vmap_pfn_apply(). This is because vmap_pfn() is intended to be
    used for mapping non-struct-page memory such as PCIe BARs. Since, udmabuf
    mostly works with pages/folios backed by shmem/hugetlbfs/THP, vmap_pfn()
    is not the right tool or API to invoke for implementing vmap.
    
    Signed-off-by: Huan Yang <[email protected]>
    Suggested-by: Vivek Kasireddy <[email protected]>
    Reported-by: Bingbu Cao <[email protected]>
    Closes: https://lore.kernel.org/dri-devel/[email protected]/T/#mbda4f64a3532b32e061f4e8763bc8e307bea3ca8
    Acked-by: Vivek Kasireddy <[email protected]>
    Signed-off-by: Vivek Kasireddy <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
RISC-V: Remove unnecessary include from compat.h [+ + +]
Author: Palmer Dabbelt <[email protected]>
Date:   Tue Nov 26 06:32:50 2024 -0800

    RISC-V: Remove unnecessary include from compat.h
    
    [ Upstream commit 8d4f1e05ff821a5d59116ab8c3a30fcae81d8597 ]
    
    Without this I get a bunch of build errors like
    
        In file included from ./include/linux/sched/task_stack.h:12,
                         from ./arch/riscv/include/asm/compat.h:12,
                         from ./arch/riscv/include/asm/pgtable.h:115,
                         from ./include/linux/pgtable.h:6,
                         from ./include/linux/mm.h:30,
                         from arch/riscv/kernel/asm-offsets.c:8:
        ./include/linux/kasan.h:50:37: error: ‘MAX_PTRS_PER_PTE’ undeclared here (not in a function); did you mean ‘PTRS_PER_PTE’?
           50 | extern pte_t kasan_early_shadow_pte[MAX_PTRS_PER_PTE + PTE_HWTABLE_PTRS];
              |                                     ^~~~~~~~~~~~~~~~
              |                                     PTRS_PER_PTE
        ./include/linux/kasan.h:51:8: error: unknown type name ‘pmd_t’; did you mean ‘pgd_t’?
           51 | extern pmd_t kasan_early_shadow_pmd[MAX_PTRS_PER_PMD];
              |        ^~~~~
              |        pgd_t
        ./include/linux/kasan.h:51:37: error: ‘MAX_PTRS_PER_PMD’ undeclared here (not in a function); did you mean ‘PTRS_PER_PGD’?
           51 | extern pmd_t kasan_early_shadow_pmd[MAX_PTRS_PER_PMD];
              |                                     ^~~~~~~~~~~~~~~~
              |                                     PTRS_PER_PGD
        ./include/linux/kasan.h:52:8: error: unknown type name ‘pud_t’; did you mean ‘pgd_t’?
           52 | extern pud_t kasan_early_shadow_pud[MAX_PTRS_PER_PUD];
              |        ^~~~~
              |        pgd_t
        ./include/linux/kasan.h:52:37: error: ‘MAX_PTRS_PER_PUD’ undeclared here (not in a function); did you mean ‘PTRS_PER_PGD’?
           52 | extern pud_t kasan_early_shadow_pud[MAX_PTRS_PER_PUD];
              |                                     ^~~~~~~~~~~~~~~~
              |                                     PTRS_PER_PGD
        ./include/linux/kasan.h:53:8: error: unknown type name ‘p4d_t’; did you mean ‘pgd_t’?
           53 | extern p4d_t kasan_early_shadow_p4d[MAX_PTRS_PER_P4D];
              |        ^~~~~
              |        pgd_t
        ./include/linux/kasan.h:53:37: error: ‘MAX_PTRS_PER_P4D’ undeclared here (not in a function); did you mean ‘PTRS_PER_PGD’?
           53 | extern p4d_t kasan_early_shadow_p4d[MAX_PTRS_PER_P4D];
              |                                     ^~~~~~~~~~~~~~~~
              |                                     PTRS_PER_PGD
    
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Palmer Dabbelt <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
s390/cpum_cf: Deny all sampling events by counter PMU [+ + +]
Author: Thomas Richter <[email protected]>
Date:   Fri Aug 22 14:05:57 2025 +0200

    s390/cpum_cf: Deny all sampling events by counter PMU
    
    [ Upstream commit ce971233242b5391d99442271f3ca096fb49818d ]
    
    Deny all sampling event by the CPUMF counter facility device driver
    and return -ENOENT. This return value is used to try other PMUs.
    Up to now events for type PERF_TYPE_HARDWARE were not tested for
    sampling and returned later on -EOPNOTSUPP. This ends the search
    for alternative PMUs. Change that behavior and try other PMUs
    instead.
    
    Fixes: 613a41b0d16e ("s390/cpum_cf: Reject request for sampling in event initialization")
    Acked-by: Sumanth Korikkar <[email protected]>
    Signed-off-by: Thomas Richter <[email protected]>
    Signed-off-by: Alexander Gordeev <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
s390/pai: Deny all events not handled by this PMU [+ + +]
Author: Thomas Richter <[email protected]>
Date:   Mon Aug 25 09:53:27 2025 +0200

    s390/pai: Deny all events not handled by this PMU
    
    [ Upstream commit 85941afd2c404247e583c827fae0a45da1c1d92c ]
    
    Each PAI PMU device driver returns -EINVAL when an event is out of
    its accepted range. This return value aborts the search for an
    alternative PMU device driver to handle this event.
    Change the return value to -ENOENT. This return value is used to
    try other PMUs instead.  This makes the PMUs more robust when
    the sequence of PMU device driver initialization changes (at boot time)
    or by using modules.
    
    Fixes: 39d62336f5c12 ("s390/pai: add support for cryptography counters")
    Acked-by: Sumanth Korikkar <[email protected]>
    Signed-off-by: Thomas Richter <[email protected]>
    Signed-off-by: Alexander Gordeev <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
serial: sc16is7xx: fix bug in flow control levels init [+ + +]
Author: Hugo Villeneuve <[email protected]>
Date:   Thu Jul 31 08:44:50 2025 -0400

    serial: sc16is7xx: fix bug in flow control levels init
    
    commit 535fd4c98452c87537a40610abba45daf5761ec6 upstream.
    
    When trying to set MCR[2], XON1 is incorrectly accessed instead. And when
    writing to the TCR register to configure flow control levels, we are
    incorrectly writing to the MSR register. The default value of $00 is then
    used for TCR, which means that selectable trigger levels in FCR are used
    in place of TCR.
    
    TCR/TLR access requires EFR[4] (enable enhanced functions) and MCR[2]
    to be set. EFR[4] is already set in probe().
    
    MCR access requires LCR[7] to be zero.
    
    Since LCR is set to $BF when trying to set MCR[2], XON1 is incorrectly
    accessed instead because MCR shares the same address space as XON1.
    
    Since MCR[2] is unmodified and still zero, when writing to TCR we are in
    fact writing to MSR because TCR/TLR registers share the same address space
    as MSR/SPR.
    
    Fix by first removing useless reconfiguration of EFR[4] (enable enhanced
    functions), as it is already enabled in sc16is7xx_probe() since commit
    43c51bb573aa ("sc16is7xx: make sure device is in suspend once probed").
    Now LCR is $00, which means that MCR access is enabled.
    
    Also remove regcache_cache_bypass() calls since we no longer access the
    enhanced registers set, and TCR is already declared as volatile (in fact
    by declaring MSR as volatile, which shares the same address).
    
    Finally disable access to TCR/TLR registers after modifying them by
    clearing MCR[2].
    
    Note: the comment about "... and internal clock div" is wrong and can be
          ignored/removed as access to internal clock div registers (DLL/DLH)
          is permitted only when LCR[7] is logic 1, not when enhanced features
          is enabled. And DLL/DLH access is not needed in sc16is7xx_startup().
    
    Fixes: dfeae619d781 ("serial: sc16is7xx")
    Cc: [email protected]
    Signed-off-by: Hugo Villeneuve <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
SUNRPC: call xs_sock_process_cmsg for all cmsg [+ + +]
Author: Justin Worrell <[email protected]>
Date:   Thu Sep 4 16:09:57 2025 -0500

    SUNRPC: call xs_sock_process_cmsg for all cmsg
    
    [ Upstream commit 9559d2fffd4f9b892165eed48198a0e5cb8504e6 ]
    
    xs_sock_recv_cmsg was failing to call xs_sock_process_cmsg for any cmsg
    type other than TLS_RECORD_TYPE_ALERT (TLS_RECORD_TYPE_DATA, and other
    values not handled.) Based on my reading of the previous commit
    (cc5d5908: sunrpc: fix client side handling of tls alerts), it looks
    like only iov_iter_revert should be conditional on TLS_RECORD_TYPE_ALERT
    (but that other cmsg types should still call xs_sock_process_cmsg). On
    my machine, I was unable to connect (over mtls) to an NFS share hosted
    on FreeBSD. With this patch applied, I am able to mount the share again.
    
    Fixes: cc5d59081fa2 ("sunrpc: fix client side handling of tls alerts")
    Signed-off-by: Justin Worrell <[email protected]>
    Reviewed-and-tested-by: Scott Mayhew <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Trond Myklebust <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
tcp_bpf: Call sk_msg_free() when tcp_bpf_send_verdict() fails to allocate psock->cork. [+ + +]
Author: Kuniyuki Iwashima <[email protected]>
Date:   Tue Sep 9 23:26:12 2025 +0000

    tcp_bpf: Call sk_msg_free() when tcp_bpf_send_verdict() fails to allocate psock->cork.
    
    [ Upstream commit a3967baad4d533dc254c31e0d221e51c8d223d58 ]
    
    syzbot reported the splat below. [0]
    
    The repro does the following:
    
      1. Load a sk_msg prog that calls bpf_msg_cork_bytes(msg, cork_bytes)
      2. Attach the prog to a SOCKMAP
      3. Add a socket to the SOCKMAP
      4. Activate fault injection
      5. Send data less than cork_bytes
    
    At 5., the data is carried over to the next sendmsg() as it is
    smaller than the cork_bytes specified by bpf_msg_cork_bytes().
    
    Then, tcp_bpf_send_verdict() tries to allocate psock->cork to hold
    the data, but this fails silently due to fault injection + __GFP_NOWARN.
    
    If the allocation fails, we need to revert the sk->sk_forward_alloc
    change done by sk_msg_alloc().
    
    Let's call sk_msg_free() when tcp_bpf_send_verdict fails to allocate
    psock->cork.
    
    The "*copied" also needs to be updated such that a proper error can
    be returned to the caller, sendmsg. It fails to allocate psock->cork.
    Nothing has been corked so far, so this patch simply sets "*copied"
    to 0.
    
    [0]:
    WARNING: net/ipv4/af_inet.c:156 at inet_sock_destruct+0x623/0x730 net/ipv4/af_inet.c:156, CPU#1: syz-executor/5983
    Modules linked in:
    CPU: 1 UID: 0 PID: 5983 Comm: syz-executor Not tainted syzkaller #0 PREEMPT(full)
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
    RIP: 0010:inet_sock_destruct+0x623/0x730 net/ipv4/af_inet.c:156
    Code: 0f 0b 90 e9 62 fe ff ff e8 7a db b5 f7 90 0f 0b 90 e9 95 fe ff ff e8 6c db b5 f7 90 0f 0b 90 e9 bb fe ff ff e8 5e db b5 f7 90 <0f> 0b 90 e9 e1 fe ff ff 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c 9f fc
    RSP: 0018:ffffc90000a08b48 EFLAGS: 00010246
    RAX: ffffffff8a09d0b2 RBX: dffffc0000000000 RCX: ffff888024a23c80
    RDX: 0000000000000100 RSI: 0000000000000fff RDI: 0000000000000000
    RBP: 0000000000000fff R08: ffff88807e07c627 R09: 1ffff1100fc0f8c4
    R10: dffffc0000000000 R11: ffffed100fc0f8c5 R12: ffff88807e07c380
    R13: dffffc0000000000 R14: ffff88807e07c60c R15: 1ffff1100fc0f872
    FS:  00005555604c4500(0000) GS:ffff888125af1000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00005555604df5c8 CR3: 0000000032b06000 CR4: 00000000003526f0
    Call Trace:
     <IRQ>
     __sk_destruct+0x86/0x660 net/core/sock.c:2339
     rcu_do_batch kernel/rcu/tree.c:2605 [inline]
     rcu_core+0xca8/0x1770 kernel/rcu/tree.c:2861
     handle_softirqs+0x286/0x870 kernel/softirq.c:579
     __do_softirq kernel/softirq.c:613 [inline]
     invoke_softirq kernel/softirq.c:453 [inline]
     __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680
     irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
     instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1052 [inline]
     sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1052
     </IRQ>
    
    Fixes: 4f738adba30a ("bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data")
    Reported-by: [email protected]
    Closes: https://lore.kernel.org/netdev/[email protected]/
    Signed-off-by: Kuniyuki Iwashima <[email protected]>
    Signed-off-by: Martin KaFai Lau <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
trace/fgraph: Fix error handling [+ + +]
Author: Guenter Roeck <[email protected]>
Date:   Fri Sep 5 22:06:18 2025 -0700

    trace/fgraph: Fix error handling
    
    [ Upstream commit ab1396af7595e7d49a3850481b24d7fe7cbdfd31 ]
    
    Commit edede7a6dcd7 ("trace/fgraph: Fix the warning caused by missing
    unregister notifier") added a call to unregister the PM notifier if
    register_ftrace_graph() failed. It does so unconditionally. However,
    the PM notifier is only registered with the first call to
    register_ftrace_graph(). If the first registration was successful and
    a subsequent registration failed, the notifier is now unregistered even
    if ftrace graphs are still registered.
    
    Fix the problem by only unregistering the PM notifier during error handling
    if there are no active fgraph registrations.
    
    Fixes: edede7a6dcd7 ("trace/fgraph: Fix the warning caused by missing unregister notifier")
    Closes: https://lore.kernel.org/all/[email protected]/
    Cc: Ye Weihua <[email protected]>
    Cc: Masami Hiramatsu <[email protected]>
    Cc: Mark Rutland <[email protected]>
    Cc: Mathieu Desnoyers <[email protected]>
    Link: https://lore.kernel.org/[email protected]
    Signed-off-by: Guenter Roeck <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
tracing: Fix tracing_marker may trigger page fault during preempt_disable [+ + +]
Author: Luo Gengkun <[email protected]>
Date:   Tue Aug 19 10:51:52 2025 +0000

    tracing: Fix tracing_marker may trigger page fault during preempt_disable
    
    [ Upstream commit 3d62ab32df065e4a7797204a918f6489ddb8a237 ]
    
    Both tracing_mark_write and tracing_mark_raw_write call
    __copy_from_user_inatomic during preempt_disable. But in some case,
    __copy_from_user_inatomic may trigger page fault, and will call schedule()
    subtly. And if a task is migrated to other cpu, the following warning will
    be trigger:
            if (RB_WARN_ON(cpu_buffer,
                           !local_read(&cpu_buffer->committing)))
    
    An example can illustrate this issue:
    
    process flow                                            CPU
    ---------------------------------------------------------------------
    
    tracing_mark_raw_write():                               cpu:0
       ...
       ring_buffer_lock_reserve():                          cpu:0
          ...
          cpu = raw_smp_processor_id()                      cpu:0
          cpu_buffer = buffer->buffers[cpu]                 cpu:0
          ...
       ...
       __copy_from_user_inatomic():                         cpu:0
          ...
          # page fault
          do_mem_abort():                                   cpu:0
             ...
             # Call schedule
             schedule()                                     cpu:0
             ...
       # the task schedule to cpu1
       __buffer_unlock_commit():                            cpu:1
          ...
          ring_buffer_unlock_commit():                      cpu:1
             ...
             cpu = raw_smp_processor_id()                   cpu:1
             cpu_buffer = buffer->buffers[cpu]              cpu:1
    
    As shown above, the process will acquire cpuid twice and the return values
    are not the same.
    
    To fix this problem using copy_from_user_nofault instead of
    __copy_from_user_inatomic, as the former performs 'access_ok' before
    copying.
    
    Link: https://lore.kernel.org/[email protected]
    Fixes: 656c7f0d2d2b ("tracing: Replace kmap with copy_from_user() in trace_marker writing")
    Signed-off-by: Luo Gengkun <[email protected]>
    Reviewed-by: Masami Hiramatsu (Google) <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

tracing: Silence warning when chunk allocation fails in trace_pid_write [+ + +]
Author: Pu Lehui <[email protected]>
Date:   Mon Sep 8 02:46:58 2025 +0000

    tracing: Silence warning when chunk allocation fails in trace_pid_write
    
    [ Upstream commit cd4453c5e983cf1fd5757e9acb915adb1e4602b6 ]
    
    Syzkaller trigger a fault injection warning:
    
    WARNING: CPU: 1 PID: 12326 at tracepoint_add_func+0xbfc/0xeb0
    Modules linked in:
    CPU: 1 UID: 0 PID: 12326 Comm: syz.6.10325 Tainted: G U 6.14.0-rc5-syzkaller #0
    Tainted: [U]=USER
    Hardware name: Google Compute Engine/Google Compute Engine
    RIP: 0010:tracepoint_add_func+0xbfc/0xeb0 kernel/tracepoint.c:294
    Code: 09 fe ff 90 0f 0b 90 0f b6 74 24 43 31 ff 41 bc ea ff ff ff
    RSP: 0018:ffffc9000414fb48 EFLAGS: 00010283
    RAX: 00000000000012a1 RBX: ffffffff8e240ae0 RCX: ffffc90014b78000
    RDX: 0000000000080000 RSI: ffffffff81bbd78b RDI: 0000000000000001
    RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
    R10: 0000000000000001 R11: 0000000000000001 R12: ffffffffffffffef
    R13: 0000000000000000 R14: dffffc0000000000 R15: ffffffff81c264f0
    FS:  00007f27217f66c0(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000001b2e80dff8 CR3: 00000000268f8000 CR4: 00000000003526f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    Call Trace:
     <TASK>
     tracepoint_probe_register_prio+0xc0/0x110 kernel/tracepoint.c:464
     register_trace_prio_sched_switch include/trace/events/sched.h:222 [inline]
     register_pid_events kernel/trace/trace_events.c:2354 [inline]
     event_pid_write.isra.0+0x439/0x7a0 kernel/trace/trace_events.c:2425
     vfs_write+0x24c/0x1150 fs/read_write.c:677
     ksys_write+0x12b/0x250 fs/read_write.c:731
     do_syscall_x64 arch/x86/entry/common.c:52 [inline]
     do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    
    We can reproduce the warning by following the steps below:
    1. echo 8 >> set_event_notrace_pid. Let tr->filtered_pids owns one pid
       and register sched_switch tracepoint.
    2. echo ' ' >> set_event_pid, and perform fault injection during chunk
       allocation of trace_pid_list_alloc. Let pid_list with no pid and
    assign to tr->filtered_pids.
    3. echo ' ' >> set_event_pid. Let pid_list is NULL and assign to
       tr->filtered_pids.
    4. echo 9 >> set_event_pid, will trigger the double register
       sched_switch tracepoint warning.
    
    The reason is that syzkaller injects a fault into the chunk allocation
    in trace_pid_list_alloc, causing a failure in trace_pid_list_set, which
    may trigger double register of the same tracepoint. This only occurs
    when the system is about to crash, but to suppress this warning, let's
    add failure handling logic to trace_pid_list_set.
    
    Link: https://lore.kernel.org/[email protected]
    Fixes: 8d6e90983ade ("tracing: Create a sparse bitmask for pid filtering")
    Reported-by: [email protected]
    Closes: https://lore.kernel.org/all/[email protected]
    Signed-off-by: Pu Lehui <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
tty: hvc_console: Call hvc_kick in hvc_write unconditionally [+ + +]
Author: Fabian Vogt <[email protected]>
Date:   Fri Aug 15 13:33:28 2025 +0200

    tty: hvc_console: Call hvc_kick in hvc_write unconditionally
    
    commit cfd956dcb101aa3d25bac321fae923323a47c607 upstream.
    
    After hvc_write completes, call hvc_kick also in the case the output
    buffer has been drained, to ensure tty_wakeup gets called.
    
    This fixes that functions which wait for a drained buffer got stuck
    occasionally.
    
    Cc: stable <[email protected]>
    Closes: https://bugzilla.opensuse.org/show_bug.cgi?id=1230062
    Signed-off-by: Fabian Vogt <[email protected]>
    Link: https://lore.kernel.org/r/2011735.PYKUYFuaPT@fvogt-thinkpad
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
tunnels: reset the GSO metadata before reusing the skb [+ + +]
Author: Antoine Tenart <[email protected]>
Date:   Thu Sep 4 14:53:50 2025 +0200

    tunnels: reset the GSO metadata before reusing the skb
    
    [ Upstream commit e3c674db356c4303804b2415e7c2b11776cdd8c3 ]
    
    If a GSO skb is sent through a Geneve tunnel and if Geneve options are
    added, the split GSO skb might not fit in the MTU anymore and an ICMP
    frag needed packet can be generated. In such case the ICMP packet might
    go through the segmentation logic (and dropped) later if it reaches a
    path were the GSO status is checked and segmentation is required.
    
    This is especially true when an OvS bridge is used with a Geneve tunnel
    attached to it. The following set of actions could lead to the ICMP
    packet being wrongfully segmented:
    
    1. An skb is constructed by the TCP layer (e.g. gso_type SKB_GSO_TCPV4,
       segs >= 2).
    
    2. The skb hits the OvS bridge where Geneve options are added by an OvS
       action before being sent through the tunnel.
    
    3. When the skb is xmited in the tunnel, the split skb does not fit
       anymore in the MTU and iptunnel_pmtud_build_icmp is called to
       generate an ICMP fragmentation needed packet. This is done by reusing
       the original (GSO!) skb. The GSO metadata is not cleared.
    
    4. The ICMP packet being sent back hits the OvS bridge again and because
       skb_is_gso returns true, it goes through queue_gso_packets...
    
    5. ...where __skb_gso_segment is called. The skb is then dropped.
    
    6. Note that in the above example on re-transmission the skb won't be a
       GSO one as it would be segmented (len > MSS) and the ICMP packet
       should go through.
    
    Fix this by resetting the GSO information before reusing an skb in
    iptunnel_pmtud_build_icmp and iptunnel_pmtud_build_icmpv6.
    
    Fixes: 4cb47a8644cc ("tunnels: PMTU discovery support for directly bridged IP packets")
    Reported-by: Adrian Moreno <[email protected]>
    Signed-off-by: Antoine Tenart <[email protected]>
    Reviewed-by: Stefano Brivio <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
USB: gadget: dummy-hcd: Fix locking bug in RT-enabled kernels [+ + +]
Author: Alan Stern <[email protected]>
Date:   Mon Aug 25 12:00:22 2025 -0400

    USB: gadget: dummy-hcd: Fix locking bug in RT-enabled kernels
    
    commit 8d63c83d8eb922f6c316320f50c82fa88d099bea upstream.
    
    Yunseong Kim and the syzbot fuzzer both reported a problem in
    RT-enabled kernels caused by the way dummy-hcd mixes interrupt
    management and spin-locking.  The pattern was:
    
            local_irq_save(flags);
            spin_lock(&dum->lock);
            ...
            spin_unlock(&dum->lock);
            ...             // calls usb_gadget_giveback_request()
            local_irq_restore(flags);
    
    The code was written this way because usb_gadget_giveback_request()
    needs to be called with interrupts disabled and the private lock not
    held.
    
    While this pattern works fine in non-RT kernels, it's not good when RT
    is enabled.  RT kernels handle spinlocks much like mutexes; in particular,
    spin_lock() may sleep.  But sleeping is not allowed while local
    interrupts are disabled.
    
    To fix the problem, rewrite the code to conform to the pattern used
    elsewhere in dummy-hcd and other UDC drivers:
    
            spin_lock_irqsave(&dum->lock, flags);
            ...
            spin_unlock(&dum->lock);
            usb_gadget_giveback_request(...);
            spin_lock(&dum->lock);
            ...
            spin_unlock_irqrestore(&dum->lock, flags);
    
    This approach satisfies the RT requirements.
    
    Signed-off-by: Alan Stern <[email protected]>
    Cc: stable <[email protected]>
    Fixes: b4dbda1a22d2 ("USB: dummy-hcd: disable interrupts during req->complete")
    Reported-by: Yunseong Kim <[email protected]>
    Closes: <https://lore.kernel.org/linux-usb/[email protected]/>
    Reported-by: [email protected]
    Closes: <https://lore.kernel.org/linux-usb/[email protected]/>
    Tested-by: [email protected]
    CC: Sebastian Andrzej Siewior <[email protected]>
    CC: [email protected]
    Reviewed-by: Sebastian Andrzej Siewior <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
usb: gadget: midi2: Fix MIDI2 IN EP max packet size [+ + +]
Author: Takashi Iwai <[email protected]>
Date:   Fri Sep 5 15:32:34 2025 +0200

    usb: gadget: midi2: Fix MIDI2 IN EP max packet size
    
    commit 116e79c679a1530cf833d0ff3007061d7a716bd9 upstream.
    
    The EP-IN of MIDI2 (altset 1) wasn't initialized in
    f_midi2_create_usb_configs() as it's an INT EP unlike others BULK
    EPs.  But this leaves rather the max packet size unchanged no matter
    which speed is used, resulting in the very slow access.
    And the wMaxPacketSize values set there look legit for INT EPs, so
    let's initialize the MIDI2 EP-IN there for achieving the equivalent
    speed as well.
    
    Fixes: 8b645922b223 ("usb: gadget: Add support for USB MIDI 2.0 function driver")
    Cc: stable <[email protected]>
    Signed-off-by: Takashi Iwai <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: gadget: midi2: Fix missing UMP group attributes initialization [+ + +]
Author: Takashi Iwai <[email protected]>
Date:   Thu Sep 4 17:39:24 2025 +0200

    usb: gadget: midi2: Fix missing UMP group attributes initialization
    
    commit 21d8525d2e061cde034277d518411b02eac764e2 upstream.
    
    The gadget card driver forgot to call snd_ump_update_group_attrs()
    after adding FBs, and this leaves the UMP group attributes
    uninitialized.  As a result, -ENODEV error is returned at opening a
    legacy rawmidi device as an inactive group.
    
    This patch adds the missing call to address the behavior above.
    
    Fixes: 8b645922b223 ("usb: gadget: Add support for USB MIDI 2.0 function driver")
    Cc: stable <[email protected]>
    Signed-off-by: Takashi Iwai <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
USB: serial: option: add Telit Cinterion FN990A w/audio compositions [+ + +]
Author: Fabio Porcedda <[email protected]>
Date:   Wed Aug 6 14:09:26 2025 +0200

    USB: serial: option: add Telit Cinterion FN990A w/audio compositions
    
    commit cba70aff623b104085ab5613fedd21f6ea19095a upstream.
    
    Add the following Telit Cinterion FN990A w/audio compositions:
    
    0x1077: tty (diag) + adb + rmnet + audio + tty (AT/NMEA) + tty (AT) +
    tty (AT) + tty (AT)
    T:  Bus=01 Lev=01 Prnt=01 Port=09 Cnt=01 Dev#=  8 Spd=480 MxCh= 0
    D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=1bc7 ProdID=1077 Rev=05.04
    S:  Manufacturer=Telit Wireless Solutions
    S:  Product=FN990
    S:  SerialNumber=67e04c35
    C:  #Ifs=10 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan
    E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
    E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 3 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=20 Driver=snd-usb-audio
    I:  If#= 4 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=snd-usb-audio
    E:  Ad=03(O) Atr=0d(Isoc) MxPS=  68 Ivl=1ms
    I:  If#= 5 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=snd-usb-audio
    E:  Ad=84(I) Atr=0d(Isoc) MxPS=  68 Ivl=1ms
    I:  If#= 6 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option
    E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=86(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 7 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=88(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 8 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8a(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 9 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8c(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    
    0x1078: tty (diag) + adb + MBIM + audio + tty (AT/NMEA) + tty (AT) +
    tty (AT) + tty (AT)
    T:  Bus=01 Lev=01 Prnt=01 Port=09 Cnt=01 Dev#= 21 Spd=480 MxCh= 0
    D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
    P:  Vendor=1bc7 ProdID=1078 Rev=05.04
    S:  Manufacturer=Telit Wireless Solutions
    S:  Product=FN990
    S:  SerialNumber=67e04c35
    C:  #Ifs=11 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#=10 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8c(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 2 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
    E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
    I:  If#= 3 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
    E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 4 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=20 Driver=snd-usb-audio
    I:  If#= 5 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=20 Driver=snd-usb-audio
    I:  If#= 6 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=snd-usb-audio
    E:  Ad=84(I) Atr=0d(Isoc) MxPS=  68 Ivl=1ms
    I:  If#= 7 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option
    E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=86(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 8 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=88(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 9 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8a(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    
    0x1079: RNDIS + tty (diag) + adb + audio + tty (AT/NMEA) + tty (AT) +
    tty (AT) + tty (AT)
    T:  Bus=01 Lev=01 Prnt=01 Port=09 Cnt=01 Dev#= 23 Spd=480 MxCh= 0
    D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=1bc7 ProdID=1079 Rev=05.04
    S:  Manufacturer=Telit Wireless Solutions
    S:  Product=FN990
    S:  SerialNumber=67e04c35
    C:  #Ifs=11 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 1 Cls=ef(misc ) Sub=04 Prot=01 Driver=rndis_host
    E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
    I:  If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
    E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#=10 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8c(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 4 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=20 Driver=snd-usb-audio
    I:  If#= 5 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=20 Driver=snd-usb-audio
    I:  If#= 6 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=20 Driver=snd-usb-audio
    E:  Ad=84(I) Atr=0d(Isoc) MxPS=  68 Ivl=1ms
    I:  If#= 7 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option
    E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=86(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 8 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=88(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 9 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8a(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    
    Cc: [email protected]
    Signed-off-by: Fabio Porcedda <[email protected]>
    Signed-off-by: Johan Hovold <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

USB: serial: option: add Telit Cinterion LE910C4-WWX new compositions [+ + +]
Author: Fabio Porcedda <[email protected]>
Date:   Fri Aug 22 11:08:39 2025 +0200

    USB: serial: option: add Telit Cinterion LE910C4-WWX new compositions
    
    commit a5a261bea9bf8444300d1067b4a73bedee5b5227 upstream.
    
    Add the following Telit Cinterion LE910C4-WWX new compositions:
    
    0x1034: tty (AT) + tty (AT) + rmnet
    T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  8 Spd=480 MxCh= 0
    D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=1bc7 ProdID=1034 Rev=00.00
    S:  Manufacturer=Telit
    S:  Product=LE910C4-WWX
    S:  SerialNumber=93f617e7
    C:  #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=fe Prot=ff Driver=option
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
    E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=85(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    
    0x1036: tty (AT) + tty (AT)
    T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 10 Spd=480 MxCh= 0
    D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=1bc7 ProdID=1036 Rev=00.00
    S:  Manufacturer=Telit
    S:  Product=LE910C4-WWX
    S:  SerialNumber=93f617e7
    C:  #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=fe Prot=ff Driver=option
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    
    0x1037: tty (diag) + tty (Telit custom) + tty (AT) + tty (AT) + rmnet
    T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 15 Spd=480 MxCh= 0
    D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=1bc7 ProdID=1037 Rev=00.00
    S:  Manufacturer=Telit
    S:  Product=LE910C4-WWX
    S:  SerialNumber=93f617e7
    C:  #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=fe Prot=ff Driver=option
    E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=85(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
    E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=87(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    
    0x1038: tty (Telit custom) + tty (AT) + tty (AT) + rmnet
    T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  9 Spd=480 MxCh= 0
    D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=1bc7 ProdID=1038 Rev=00.00
    S:  Manufacturer=Telit
    S:  Product=LE910C4-WWX
    S:  SerialNumber=93f617e7
    C:  #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=82(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=fe Prot=ff Driver=option
    E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=84(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
    E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=86(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    
    0x103b: tty (diag) + tty (Telit custom) + tty (AT) + tty (AT)
    T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 10 Spd=480 MxCh= 0
    D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=1bc7 ProdID=103b Rev=00.00
    S:  Manufacturer=Telit
    S:  Product=LE910C4-WWX
    S:  SerialNumber=93f617e7
    C:  #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=fe Prot=ff Driver=option
    E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=85(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    
    0x103c: tty (Telit custom) + tty (AT) + tty (AT)
    T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 11 Spd=480 MxCh= 0
    D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=1bc7 ProdID=103c Rev=00.00
    S:  Manufacturer=Telit
    S:  Product=LE910C4-WWX
    S:  SerialNumber=93f617e7
    C:  #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=82(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=fe Prot=ff Driver=option
    E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=84(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    
    Cc: [email protected]
    Signed-off-by: Fabio Porcedda <[email protected]>
    Signed-off-by: Johan Hovold <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
usb: typec: tcpm: properly deliver cable vdms to altmode drivers [+ + +]
Author: RD Babiera <[email protected]>
Date:   Thu Aug 21 20:37:57 2025 +0000

    usb: typec: tcpm: properly deliver cable vdms to altmode drivers
    
    commit f34bfcc77b18375a87091c289c2eb53c249787b4 upstream.
    
    tcpm_handle_vdm_request delivers messages to the partner altmode or the
    cable altmode depending on the SVDM response type, which is incorrect.
    The partner or cable should be chosen based on the received message type
    instead.
    
    Also add this filter to ADEV_NOTIFY_USB_AND_QUEUE_VDM, which is used when
    the Enter Mode command is responded to by a NAK on SOP or SOP' and when
    the Exit Mode command is responded to by an ACK on SOP.
    
    Fixes: 7e7877c55eb1 ("usb: typec: tcpm: add alt mode enter/exit/vdm support for sop'")
    Cc: [email protected]
    Signed-off-by: RD Babiera <[email protected]>
    Reviewed-by: Badhri Jagan Sridharan <[email protected]>
    Reviewed-by: Heikki Krogerus <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
x86/cpu/topology: Always try cpu_parse_topology_ext() on AMD/Hygon [+ + +]
Author: K Prateek Nayak <[email protected]>
Date:   Mon Sep 1 17:04:15 2025 +0000

    x86/cpu/topology: Always try cpu_parse_topology_ext() on AMD/Hygon
    
    commit cba4262a19afae21665ee242b3404bcede5a94d7 upstream.
    
    Support for parsing the topology on AMD/Hygon processors using CPUID leaf 0xb
    was added in
    
      3986a0a805e6 ("x86/CPU/AMD: Derive CPU topology from CPUID function 0xB when available").
    
    In an effort to keep all the topology parsing bits in one place, this commit
    also introduced a pseudo dependency on the TOPOEXT feature to parse the CPUID
    leaf 0xb.
    
    The TOPOEXT feature (CPUID 0x80000001 ECX[22]) advertises the support for
    Cache Properties leaf 0x8000001d and the CPUID leaf 0x8000001e EAX for
    "Extended APIC ID" however support for 0xb was introduced alongside the x2APIC
    support not only on AMD [1], but also historically on x86 [2].
    
    Similar to 0xb, the support for extended CPU topology leaf 0x80000026 too does
    not depend on the TOPOEXT feature.
    
    The support for these leaves is expected to be confirmed by ensuring
    
      leaf <= {extended_}cpuid_level
    
    and then parsing the level 0 of the respective leaf to confirm EBX[15:0]
    (LogProcAtThisLevel) is non-zero as stated in the definition of
    "CPUID_Fn0000000B_EAX_x00 [Extended Topology Enumeration]
    (Core::X86::Cpuid::ExtTopEnumEax0)" in Processor Programming Reference (PPR)
    for AMD Family 19h Model 01h Rev B1 Vol1 [3] Sec. 2.1.15.1 "CPUID Instruction
    Functions".
    
    This has not been a problem on baremetal platforms since support for TOPOEXT
    (Fam 0x15 and later) predates the support for CPUID leaf 0xb (Fam 0x17[Zen2]
    and later), however, for AMD guests on QEMU, the "x2apic" feature can be
    enabled independent of the "topoext" feature where QEMU expects topology and
    the initial APICID to be parsed using the CPUID leaf 0xb (especially when
    number of cores > 255) which is populated independent of the "topoext" feature
    flag.
    
    Unconditionally call cpu_parse_topology_ext() on AMD and Hygon processors to
    first parse the topology using the XTOPOLOGY leaves (0x80000026 / 0xb) before
    using the TOPOEXT leaf (0x8000001e).
    
    While at it, break down the single large comment in parse_topology_amd() to
    better highlight the purpose of each CPUID leaf.
    
    Fixes: 3986a0a805e6 ("x86/CPU/AMD: Derive CPU topology from CPUID function 0xB when available")
    Suggested-by: Naveen N Rao (AMD) <[email protected]>
    Signed-off-by: K Prateek Nayak <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Cc: [email protected] # Only v6.9 and above; depends on x86 topology rewrite
    Link: https://lore.kernel.org/lkml/[email protected]/ [1]
    Link: https://lore.kernel.org/lkml/[email protected]/ [2]
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 [3]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
x86: disable image size check for test builds [+ + +]
Author: Guenter Roeck <[email protected]>
Date:   Wed Apr 16 18:09:50 2025 -0700

    x86: disable image size check for test builds
    
    commit 00a241f528427b63c415a410293b86e66098888e upstream.
    
    64-bit allyesconfig builds fail with
    
    x86_64-linux-ld: kernel image bigger than KERNEL_IMAGE_SIZE
    
    Bisect points to commit 6f110a5e4f99 ("Disable SLUB_TINY for build
    testing") as the responsible commit.  Reverting that patch does indeed fix
    the problem.  Further analysis shows that disabling SLUB_TINY enables
    KASAN, and that KASAN is responsible for the image size increase.
    
    Solve the build problem by disabling the image size check for test
    builds.
    
    [[email protected]: add comment, fix nearby typo (sink->sync)]
    [[email protected]: fix comment snafu
      Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 6f110a5e4f99 ("Disable SLUB_TINY for build testing")
    Signed-off-by: Guenter Roeck <[email protected]>
    Cc: Linus Torvalds <[email protected]>
    Cc: Alexander Potapenko <[email protected]>
    Cc: Andrey Konovalov <[email protected]>
    Cc: Andrey Ryabinin <[email protected]>
    Cc: Borislav Betkov <[email protected]>
    Cc: Dmitriy Vyukov <[email protected]>
    Cc: "H. Peter Anvin" <[email protected]>
    Cc: Ingo Molnar <[email protected]>
    Cc: Thomas Gleinxer <[email protected]>
    Cc: Vincenzo Frascino <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
xhci: fix memory leak regression when freeing xhci vdev devices depth first [+ + +]
Author: Mathias Nyman <[email protected]>
Date:   Tue Sep 2 13:53:06 2025 +0300

    xhci: fix memory leak regression when freeing xhci vdev devices depth first
    
    commit edcbe06453ddfde21f6aa763f7cab655f26133cc upstream.
    
    Suspend-resume cycle test revealed a memory leak in 6.17-rc3
    
    Turns out the slot_id race fix changes accidentally ends up calling
    xhci_free_virt_device() with an incorrect vdev parameter.
    The vdev variable was reused for temporary purposes right before calling
    xhci_free_virt_device().
    
    Fix this by passing the correct vdev parameter.
    
    The slot_id race fix that caused this regression was targeted for stable,
    so this needs to be applied there as well.
    
    Fixes: 2eb03376151b ("usb: xhci: Fix slot_id resource race conflict")
    Reported-by: David Wang <[email protected]>
    Closes: https://lore.kernel.org/linux-usb/[email protected]
    Suggested-by: Michal Pecio <[email protected]>
    Suggested-by: David Wang <[email protected]>
    Cc: [email protected]
    Tested-by: David Wang <[email protected]>
    Signed-off-by: Mathias Nyman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>