summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2026-09-29vfio/fsl-mc: prevent read-only region mappings from becoming writableAbdifatah Suruur
vfio_fsl_mc_mmap() rejects writable mappings of regions without the WRITE flag, but leaves VM_MAYWRITE set. Userspace can map such a region read-only and then upgrade the mapping to writable with mprotect(). Clear VM_MAYWRITE for regions without the WRITE flag, as i915 does for its read-only objects and as fixed in drm/vc4 (CVE-2026-68445), drm/panthor (CVE-2024-53071) and commit a5edadbae57e ("ptp: vmclock: prevent read-only mappings from becoming writable"). Note this is defensive hardening: the fsl-mc bus publishes all device regions with the WRITE flag set, so no device can currently reach the read-only path. The guard costs nothing and keeps the mmap() interface honest if a read-only region ever appears. Fixes: 67247289688d4 ("vfio/fsl-mc: Allow userspace to MMAP fsl-mc device MMIO regions") Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Abdifatah Suruur <suruurism@gmail.com> Link: https://lore.kernel.org/r/20260929094848.7439-3-suruurism@gmail.com Signed-off-by: Alex Williamson <alex@shazbot.org>
2026-09-29vfio/platform: prevent read-only region mappings from becoming writableAbdifatah Suruur
vfio_platform_mmap() rejects writable mappings of regions without the WRITE flag, but leaves VM_MAYWRITE set. Userspace can map such a region read-only and then upgrade the mapping to writable with mprotect(). Clear VM_MAYWRITE for regions without the WRITE flag, as i915 does for its read-only objects and as fixed in drm/vc4 (CVE-2026-68445), drm/panthor (CVE-2024-53071) and commit a5edadbae57e ("ptp: vmclock: prevent read-only mappings from becoming writable"). Note this is defensive hardening: no in-tree platform driver currently publishes a region without the WRITE flag. The guard costs nothing and keeps the mmap() interface honest if a read-only region ever appears. Fixes: fad4d5b1f042 ("vfio/platform: support MMAP of MMIO regions") Reviewed-by: Mostafa Saleh <smostafa@google.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Pranjal Shrivastava <praan@google.com> Signed-off-by: Abdifatah Suruur <suruurism@gmail.com> Link: https://lore.kernel.org/r/20260929094848.7439-2-suruurism@gmail.com Signed-off-by: Alex Williamson <alex@shazbot.org>
2026-09-29RDMA/rtrs-clt: Don't WARN on unexpected info-response opcodeQuanye Yang
The info-response receive is posted for a SEND. The completion opcode comes from the peer, so RDMA WRITE with Immediate is a legal WC on that WQE even though it violates the RTRS handshake. WARN_ON(wc->opcode != IB_WC_RECV) treats that peer-controlled field as an internal invariant and panics with panic_on_warn. Treat a non-SEND completion as a handshake failure: log it and keep the existing CONNECTING_ERR cleanup. Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Link: https://patch.msgid.link/r/20260921-rtrs-fix-rtrs-clt-info-rsp-done-v1-1-c64281ed97c0@proton.me Reported-by: Farhad Alemi <farhad.alemi@berkeley.edu> Closes: https://lore.kernel.org/linux-rdma/CA+0ovCge-K+hcGHXZ4R3Ww5+cg159uxHBeVbKeUSLBRSMT8OWA@mail.gmail.com/ Signed-off-by: Quanye Yang <quanyeyang@proton.me> Reviewed-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2026-09-29RDMA/efa: Use __GFP_RETRY_MAYFAIL for ring allocationsMichael Margolin
RQ and CQ ring buffers require physically contiguous memory. On systems under memory pressure, high-order allocations can fail even when sufficient free memory exists because the allocator gives up after a single reclaim and compaction attempt for costly-order requests that lack __GFP_RETRY_MAYFAIL. Add __GFP_RETRY_MAYFAIL to the GFP flags in efa_zalloc_mapped() to allow retries with escalating compaction priority and release of highatomic reserves before giving up. Link: https://patch.msgid.link/r/20260917105101.9365-1-mrgolin@amazon.com Reviewed-by: Firas Jahjah <firasj@amazon.com> Reviewed-by: Yonatan Nachum <ynachum@amazon.com> Signed-off-by: Michael Margolin <mrgolin@amazon.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2026-09-29drm/dp/mst: reject DPCD read/write on ports with ddps=0Xiao Lu
DP v2.1b specifies that REMOTE_DPCD_READ and REMOTE_DPCD_WRITE transactions should only be issued to downstream ports where ddps=1 (device plug status indicates a device is connected). Issuing these transactions to empty ports (ddps=0) is non-compliant and causes problems in practice: some MST hubs NAK the request, and all hubs introduce a delay waiting for the transaction to complete or fail before the driver can proceed, increasing link training latency. Guard drm_dp_mst_dpcd_read() and drm_dp_mst_dpcd_write() with a ddps check and return -EIO immediately for unoccupied ports. This avoids the spurious sideband transactions without changing connector lifetime semantics — connectors for all output ports are still created at enumeration time, regardless of ddps. Signed-off-by: Xiao Lu <xiaolu.xie@intel.com> Changes in v2: - Instead of skipping connector creation for ddps=0 ports (v1), keep connectors around and guard DPCD transactions at the drm_dp_mst_dpcd_read/write level. This avoids changing connector lifetime semantics visible to userspace, per Lyude's review. Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patch.msgid.link/20260920022144.2209244-1-xiaolu.xie@intel.com
2026-09-29tpm: Disable TPM on null key name mismatchSurendran Kanagaraj
The null key name check exists to protect against TPM reset attacks, so a mismatch should stop the device from serving further requests. Currently it does not disable the chip when it finds a mismatch. The mismatch is logged: tpm tpm0: null key integrity check failed but the chip keeps serving commands: / # tpm2_getcap -c properties-fixed TPM_PT_FAMILY_INDICATOR: as UINT32: 0x08322e3000 as string: "2.0" ... tpm2_load_null() where the null key name check is run sets the chip as disabled only if the rc is non zero. When the mismatch is seen, rc is zero at that point and it returns success. The other issue is that the caller expects the null key handle to be populated when the function returns 0 which it does here without writing the handle and proceeds assuming the null key handle is valid. During the test, I noticed that tpm2_start_auth_session() uses the uninitialized stack value as the key handle since tpm2_load_null() returns 0 despite the integrity failure and proceeds with TPM2_CC_START_AUTH_SESS with this value as salt key handle. Set rc to -ENODEV on the mismatch. The error path then disables the chip and returns the correct code to the caller. Tested in QEMU with swtpm and CONFIG_TCG_TPM2_HMAC=y by making TPM2_CC_CONTEXT_LOAD fail with TPM2_RC_INTEGRITY and changing the name of the re-created null key. The chip is now disabled on the mismatch. Fixes: cc7d8594342a ("tpm: Rollback tpm2_load_null()") Fixes: 423893fcbe7e ("tpm: Disable TPM on tpm2_create_primary() failure") Cc: stable@vger.kernel.org # v6.12+ Assisted-by: LLM Signed-off-by: Surendran Kanagaraj <surenkj@amazon.com> Link: https://lore.kernel.org/r/20260918000731.48657-1-surenkj@amazon.com Reviewed-by: Gunnar Kudrjavets <gunnarku@amazon.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
2026-09-29tpm: fix off-by-four bounds check in tpm2_get_random()Jiangshan Yi
When the response carries the TPM2_ST_SESSIONS tag, tpm2_get_random() skips the 4-byte parameter size field before locating the random data, but the bounds check still validates the response length against TPM_HEADER_SIZE. A truncated response can pass the check and make memcpy() read up to 4 bytes past the response end, so stale buffer contents end up in the caller's random bytes. Fix this by checking the response length against 'offset', which already includes the skipped parameter size field. Cc: stable@vger.kernel.org # v6.12+ Fixes: 1b6d7f9eb150 ("tpm: add session encryption protection to tpm2_get_random()") Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://sashiko.dev/#/patchset/20260902074839.417419-1-yijiangshan%40kylinos.cn Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Link: https://lore.kernel.org/r/20260903035837.219284-1-yijiangshan@kylinos.cn Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
2026-09-29tpm: Fix auth session leak in tpm2_get_random() error pathJiangshan Yi
When tpm_buf_fill_hmac_session() fails in tpm2_get_random(), the error path returns without calling tpm2_end_auth_session(), leaking the auth session. All other error paths in the function handle this correctly. Fixes: 3d9e043dab0a ("tpm-buf: Memory-safe allocations") Cc: stable@vger.kernel.orga # v6.12+ Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn> Link: https://lore.kernel.org/r/20260902074839.417419-1-yijiangshan@kylinos.cn Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
2026-09-29tpm: Fix heap buffer overflow in tpm_transmit_cmd()Jiangshan Yi
struct tpm_buf now uses an embedded flexible array for data, which is 6 bytes shorter than TPM_BUFSIZE due to the struct header. But tpm_transmit_cmd() still passes PAGE_SIZE to tpm_transmit(), and after clamping to TPM_BUFSIZE in tpm_try_transmit(), chip->ops->recv() can write past the end of data[] by 6 bytes. Pass buf->capacity to tpm_transmit() instead. Fixes: 3d9e043dab0a ("tpm-buf: Memory-safe allocations") Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn> Link: https://lore.kernel.org/r/20260901062850.379870-1-yijiangshan@kylinos.cn Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
2026-09-29gpu: nova-core: use a single try_pin_init!() block in probe()Danilo Krummrich
Just like in Gpu::new() a single try_pin_init!() block makes the code more readable. Besides that, it prepares the code for a proper PCI device enable guard that we will get soon. Reviewed-by: Eliot Courtney <ecourtney@nvidia.com> Acked-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://patch.msgid.link/20260927144417.1280385-1-dakr@kernel.org [ Drop useless dev_dbg!() in probe(). - Danilo ] Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-09-29clk: tenstorrent: use regmap_assign_bits() for conditional set/clearPeng Fan
Replace if/else blocks using regmap_set_bits()/regmap_clear_bits() with the simpler regmap_assign_bits() call. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com> Reviewed-by: Drew Fustini (Tenstorrent) <fustini@kernel.org> Link: https://patch.msgid.link/20260924083439.461769-1-peng.fan@oss.nxp.com Signed-off-by: Drew Fustini (Tenstorrent) <fustini@kernel.org>
2026-09-29clk: tenstorrent: Fix refcount leak on shared gate clk enable failureAnirudh Srinivasan
atlantis_clk_gate_shared_enable() increments the refcount for the number of clks requesting the shared gate clk to be enabled always. It should only do this when the enable for the gate took effect in hardware. It's possible to end up in a situation where the gate enable failed, but the refcount is incremented anyway, so subsequent requests by other clks that share the same refcount get ignored and the gate enable is never retried. Update this function so that the refcount is not incremented when the gate clk enable fails in hardware. Fixes: 23c8ebc95284 ("clk: tenstorrent: Add Atlantis clock controller driver") Cc: stable@vger.kernel.org Reported-by: Sashiko <sashiko-bot@kernel.org> Link: https://sashiko.dev/#/patchset/AS8P251MB00013BD9A093C06D2D60E10EC8B42%40AS8P251MB0001.EURP251.PROD.OUTLOOK.COM Signed-off-by: Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com> Reviewed-by: Drew Fustini (Tenstorrent) <fustini@kernel.org> Link: https://patch.msgid.link/20260924-atlantis_gate_shared_enable_fix-v1-1-303f925b8a3d@oss.tenstorrent.com Signed-off-by: Drew Fustini (Tenstorrent) <fustini@kernel.org>
2026-09-29clk: tenstorrent: Assign .num before accessing .hwsAamir Ahmed
Commit f316cdff8d67 ("clk: Annotate struct clk_hw_onecell_data with __counted_by") annotated the hws member of 'struct clk_hw_onecell_data' with __counted_by, which informs the bounds sanitizer (UBSAN_BOUNDS) about the number of elements in .hws[], so that it can warn when .hws[] is accessed out of bounds. As noted in that change, the __counted_by member must be initialized with the number of elements before the first array access happens, otherwise there will be a warning from each access prior to the initialization because the number of elements is zero. This occurs in atlantis_prcm_clocks_register() due to .num being assigned only after every clock has been stored in .hws[]. With CONFIG_UBSAN_BOUNDS and a compiler that implements __counted_by (GCC 15.1+ or Clang 20.1+), this triggers an array-index-out-of-bounds report during probe, and with CONFIG_UBSAN_TRAP the first store traps so the clock provider never registers. Move the .num initialization to right after the allocation. Fixes: 23c8ebc95284 ("clk: tenstorrent: Add Atlantis clock controller driver") Cc: stable@vger.kernel.org Assisted-by: LLM Signed-off-by: Aamir Ahmed <elb12345@hotmail.co.uk> Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Reviewed-by: Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com> Reviewed-by: Drew Fustini (Tenstorrent) <fustini@kernel.org> Link: https://patch.msgid.link/AS8P251MB00013BD9A093C06D2D60E10EC8B42@AS8P251MB0001.EURP251.PROD.OUTLOOK.COM [fustini: drop num_clks, use data->num per Gustavo] Signed-off-by: Drew Fustini (Tenstorrent) <fustini@kernel.org>
2026-09-29RDMA/cxgb4: Do not allow userspace to write the status pageJiale Yao
The device status page is shared by all userspace contexts and contains db_off, which the driver updates to control doorbell flow. The rdma-core provider maps it with PROT_READ, but c4iw_mmap() passes the requested page protection through when handling CXGB4_MMAP_CONTIG. A process can therefore request PROT_WRITE directly or later upgrade a read-only mapping with mprotect() because VM_MAYWRITE remains set. This lets userspace alter device-wide flow-control state seen by the kernel and other contexts. Reject initially writable mappings and clear VM_MAYWRITE before mapping the page. This preserves the existing read-only userspace ABI. Fixes: 05eb23893c2c ("cxgb4/iw_cxgb4: Doorbell Drop Avoidance Bug Fixes") Signed-off-by: Jiale Yao <yaojiale02@163.com> Link: https://patch.msgid.link/20260926112611.3214382-1-yaojiale02@163.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
2026-09-29RDMA/mlx4: Do not allow the user to write to the clock pageJiale Yao
mlx4_ib_mmap() maps the internal clock page to userspace through rdma_user_mmap_io(), which does not restrict write access. Userspace can request PROT_WRITE directly, or upgrade a read-only mapping later with mprotect() because VM_MAYWRITE remains set. Reject VM_WRITE, VM_EXEC and clear VM_MAYWRITE, applying the same read-only policy as commit c660133c339f ("RDMA/mlx5: Do not allow the user to write to the clock page"). The rdma-core mlx4 provider requests this mapping with PROT_READ, so its existing behavior is unchanged. Fixes: 52033cfb5aab ("IB/mlx4: Add mmap call to map the hardware clock") Signed-off-by: Jiale Yao <yaojiale02@163.com> Link: https://patch.msgid.link/20260926111150.3197004-1-yaojiale02@163.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
2026-09-29RDMA/mad: Reject receive completions shorter than GRHJiale Yao
ib_mad_recv_done() derives the OPA MAD length by subtracting the GRH size from wc->byte_len without ensuring the receive completion covers the GRH. If it is shorter, the subtraction wraps before the result is stored in mad_len and an invalid length can be passed downstream. Reject receive completions shorter than the GRH before inspecting the MAD header or deriving the MAD length. Fixes: 8e4349d13f33 ("IB/mad: Add final OPA MAD processing") Signed-off-by: Jiale Yao <yaojiale02@163.com> Link: https://patch.msgid.link/20260926105927.3183294-1-yaojiale02@163.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
2026-09-29virtio_blk: set the zone write granularityNiklas Cassel
virtblk_read_zoned_limits() reads the write granularity that the device reports in virtio_blk_zoned_characteristics and assigns it to the physical block size and to io_min, but never to the limit that is named after it. queue_limits.zone_write_granularity is left at zero, so blk_validate_zoned_limits() raises it to the logical block size: if (lim->zone_write_granularity < lim->logical_block_size) lim->zone_write_granularity = lim->logical_block_size; A device that reports a granularity coarser than its logical block size, which is what the field exists to express, therefore has it silently reduced. A 512e host managed disk passed through to a guest reports a logical block size of 512 and a write granularity of 4096, and the guest ends up with a zone write granularity of 512. bio_split_alignment() returns lim->zone_write_granularity if it is non-zero and bio_split_io_at() may split a bio with as per bio_split_alignment(). This can real to the write getting rejected by the host drive, as the write is not aligned to the physical block size. zonefs also takes its block size from bdev_zone_write_granularity(), so it would incorrectly use 512 on a disk that requires 4096. sd_zbc_read_zones() sets the limit from the physical block size for the same reason. NVMe ZNS and null_blk leave it unset, but the fallback gives the right answer for them, as their write granularity is the logical block size. virtio carries a separate value that may exceed it. Set the zone write granularity from the value that the device reports. Fixes: 95bfec41bd3d ("virtio-blk: add support for zoned block devices") Signed-off-by: Niklas Cassel <cassel@kernel.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Link: https://patch.msgid.link/20260918140641.2031075-2-cassel@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-09-29RDMA/ionic: Fix double removal of CMB mmap entries in create QP error pathAbhijit Gangurde
The error unwind in ionic_create_qp() removes the SQ and RQ CMB mmap entries explicitly, and then falls through to ionic_qp_rq_destroy() and ionic_qp_sq_destroy(), whose ionic_qp_{rq,sq}_destroy_cmb() helpers remove the very same entries a second time. Drop the explicit removals and leave ionic_qp_{rq,sq}_destroy_cmb() as the single owner on the ionic_destroy_qp() path. Fixes: e8521822c733 ("RDMA/ionic: Register device ops for control path") Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com> Link: https://patch.msgid.link/20260925093638.3032149-2-abhijit.gangurde@amd.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
2026-09-29RDMA/ionic: Fix XArray initialization to use XArray flagsAbhijit Gangurde
xa_init_flags() takes XArray flags (XA_FLAGS_*), not gfp flags, even though the parameter is typed gfp_t. Passing GFP_ATOMIC leaves both lock-type bits clear, so xa_lock_type() resolves to XA_LOCK_NORMAL for qp_tbl and cq_tbl. Both tables are used with the IRQ-safe accessors: xa_store_irq() with GFP_KERNEL from process context, and xa_lock_irqsave() from the event queue path. When a store needs to grow the tree, __xas_nomem() drops the lock using the recorded lock type before allocating: if (gfpflags_allow_blocking(gfp)) { xas_unlock_type(xas, lock_type); xas->xa_alloc = kmem_cache_alloc_lru(...); xas_lock_type(xas, lock_type); } With XA_LOCK_NORMAL that is a plain spin_unlock(), so the sleeping GFP_KERNEL allocation runs with interrupts still disabled by xa_store_irq(), and lockdep annotates the lock with the wrong class. GFP_ATOMIC also happens to set __GFP_HIGH (0x20), which collides with XA_FLAGS_ACCOUNT (32U) and silently enables memcg accounting of the XArray nodes. Use XA_FLAGS_LOCK_IRQ so the lock type matches how the tables are actually accessed. Fixes: e8521822c733 ("RDMA/ionic: Register device ops for control path") Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com> Link: https://patch.msgid.link/20260925093638.3032149-1-abhijit.gangurde@amd.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
2026-09-29RDMA/siw: drop duplicate check_app_limited in siw_tcp_sendpagesGeliang Tang
After do_tcp_sendpages() was converted to use MSG_SPLICE_PAGES and later inlined as direct tcp_sendmsg_locked() calls, callers that previously needed an explicit tcp_rate_check_app_limited(sk) to cover do_tcp_sendpages() no longer need it. tcp_sendmsg_locked() performs the check on every path that queues data, making the outer call redundant. The site changed here, siw_tcp_sendpages() in siw_qp_tx.c, holds the socket lock and invokes tcp_sendmsg_locked() on every iteration. The early-return paths in tcp_sendmsg_locked() that skip tcp_rate_check_app_limited() - the MSG_ZEROCOPY allocation failure and MSG_FASTOPEN branches - return without queueing any MSG_SPLICE_PAGES data, so there is no functional consequence from omitting the outer check. Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Link: https://patch.msgid.link/32ef40cc81486adb8f2d43585224ab44d7e77f73.1790234916.git.tanggeliang@kylinos.cn Acked-by: Bernard Metzler <bernard.metzler@linux.dev> Signed-off-by: Leon Romanovsky <leon@kernel.org>
2026-09-29accel/amdxdna: Add support for AIE2 revision 9Lizhi Hou
aie2_get_dev_revision() fails to recognize AIE2 revision 9 hardware. Add AIE2_DEV_REVISION_GRGH to the list of supported AIE2 revisions. Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Link: https://patch.msgid.link/20260929181459.928468-1-lizhi.hou@amd.com
2026-09-29accel/amdxdna: Replace create_singlethread_workqueue with ↵George Karagounis
alloc_ordered_workqueue create_singlethread_workqueue() is deprecated. Replace it with alloc_ordered_workqueue() to use the shared system workqueue infrastructure more efficiently. WQ_MEM_RECLAIM is added to ensure the mailbox can process interrupts under memory pressure. Reviewed-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: George Karagounis <mail@taterr.org> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Link: https://patch.msgid.link/20260925124804.58808-2-mail@taterr.org
2026-09-29RDMA/rxe: Reject prefetch of a non-ODP MRNorbert Szetei
rxe_ib_advise_mr_prefetch() and rxe_ib_prefetch_sg_list() look up the MR by lkey and hand it to rxe_odp_do_pagefault_and_lock() without checking that it is an ODP MR. That path runs to_ib_umem_odp() on mr->umem, and for a non-ODP MR mr->umem is a plain struct ib_umem from ib_umem_get(), so the container_of() in to_ib_umem_odp() lands past the end of the object and ib_umem_odp_map_dma_and_lock() reads its ib_umem_odp fields out of bounds. lookup_mr() validates the lkey, PD, access and state but not the MR type, and IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH is accepted for any MR. BUG: KASAN: slab-out-of-bounds in ib_umem_odp_map_dma_and_lock+0x884/0x8a0 Read of size 8 at addr ffff88810a3ebcf0 by task advi/921 ib_umem_odp_map_dma_and_lock+0x884/0x8a0 rxe_ib_advise_mr+0x543/0xad0 ib_uverbs_handler_UVERBS_METHOD_ADVISE_MR+0x446/0x530 ib_uverbs_cmd_verbs+0x2b3c/0x3b20 ib_uverbs_ioctl+0x1e3/0x310 Allocated by task 921: __ib_umem_get_va+0x13e/0xae0 rxe_mr_init_user+0x2ae/0xb00 rxe_reg_user_mr+0x337/0x510 The buggy address belongs to the object at ffff88810a3ebc80 which belongs to the cache kmalloc-96 of size 96 Ask lookup_mr() for IB_ACCESS_ON_DEMAND in both the synchronous and the asynchronous prefetch arm. mr->access carries that flag only for an MR registered as ODP, so the existing (access & mr->access) != access test rejects a plain MR and the prefetch fails with -EINVAL. Fixes: 3576b0df1588 ("RDMA/rxe: Implement synchronous prefetch for ODP MRs") Signed-off-by: Norbert Szetei <norbert@doyensec.com> Link: https://patch.msgid.link/20260923-rxe-advise-mr-v3-v3-2-95e1a4077e4d@doyensec.com Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev> Signed-off-by: Leon Romanovsky <leon@kernel.org>
2026-09-29RDMA/rxe: Reject IB_ACCESS_ON_DEMAND changes after MR creationNorbert Szetei
Whether an MR is an ODP MR is decided once, at registration time: rxe_reg_user_mr() picks rxe_odp_mr_init_user() over rxe_mr_init_user() based on IB_ACCESS_ON_DEMAND, and only the former builds an ib_umem_odp via ib_umem_odp_get(). The umem cannot change type afterwards, and is_odp_mr() reads mr->umem->is_odp. Two paths assign mr->access after that point and can leave it describing an MR type the umem does not have: rxe_rereg_user_mr() with IB_MR_REREG_ACCESS overwrites mr->access with the caller's value, and IB_ACCESS_ON_DEMAND is part of RXE_ACCESS_SUPPORTED_MR, so userspace can set the flag on a plain MR or clear it on an ODP MR while the umem stays what it was. rxe_reg_fast_mr() takes mr->access from the REG_MR work request unmasked and moves the MR to RXE_MR_STATE_VALID, on an MR that rxe_mr_init_fast() left with a NULL umem. Reject IB_ACCESS_ON_DEMAND in both, so mr->access carries the flag only for an MR that has an ODP umem and the flag can be used to identify one. Fixes: 544c7f62cf32 ("RDMA/rxe: Implement rereg_user_mr") Signed-off-by: Norbert Szetei <norbert@doyensec.com> Link: https://patch.msgid.link/20260923-rxe-advise-mr-v3-v3-1-95e1a4077e4d@doyensec.com Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev> Signed-off-by: Leon Romanovsky <leon@kernel.org>
2026-09-29RDMA/rxe: unpublish the per-net tunnel socket beforeBinbin Deng
KASAN reports a slab-use-after-free in ip6_route_output_flags() reached from rxe_find_route(), with the free in __sk_destruct() after rxe_sock_put(), and a user with CAP_NET_ADMIN can remove the device with "rdma link del rxe0" while RoCE v2 over IPv6 traffic keeps looking the socket up. BUG: KASAN: slab-use-after-free in ip6_route_output_flags+0x300/0x360 Read of size 4 at addr ffff888115ddd794 by task kworker/u32:6/309 Call Trace: <TASK> dump_stack_lvl+0x53/0x70 print_report+0xd0/0x630 ? __pfx__raw_spin_lock_irqsave+0x10/0x10 ? ip6_route_output_flags+0x300/0x360 kasan_report+0xce/0x100 ? ip6_route_output_flags+0x300/0x360 ip6_route_output_flags+0x300/0x360 ip6_dst_lookup_tail.constprop.0+0x76c/0xcc0 ? ct_nmi_exit+0xc3/0xf0 ip6_dst_lookup_flow+0xf5/0x1e0 ? __pfx_ip6_dst_lookup_flow+0x10/0x10 rxe_find_route+0x426/0xa30 ? __kasan_slab_alloc+0x6e/0x70 ? __pfx_rxe_find_route+0x10/0x10 ? kmem_cache_alloc_node_noprof+0x141/0x370 ? kmalloc_reserve+0x103/0x2b0 ? rxe_icrc_generate+0x229/0x330 ? __pfx___alloc_skb+0x10/0x10 rxe_prepare+0x9e8/0x18b0 ? rxe_init_packet+0x3c7/0x4f0 rxe_requester+0x1a0f/0x51f0 ? rxe_completer+0x1de9/0x38c0 ? __pfx_rxe_completer+0x10/0x10 ? __queue_work+0x43e/0x11f0 ? __pfx_rxe_requester+0x10/0x10 ? irqentry_exit+0xd2/0x640 ? _raw_spin_lock_irqsave+0x85/0xe0 ? __pfx__raw_spin_lock_irqsave+0x10/0x10 ? __pfx_rxe_sender+0x10/0x10 rxe_sender+0xe/0x30 do_work+0x144/0x470 process_one_work+0x633/0x1030 ? assign_work+0x11d/0x370 worker_thread+0x45b/0xd10 ? __pfx_worker_thread+0x10/0x10 kthread+0x2c6/0x3b0 ? recalc_sigpending+0x15c/0x1e0 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x36e/0x5a0 ? __pfx_ret_from_fork+0x10/0x10 ? __switch_to+0x572/0xdd0 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 </TASK> Allocated by task 146020: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 __kasan_slab_alloc+0x6e/0x70 kmem_cache_alloc_noprof+0x130/0x360 sk_prot_alloc+0x56/0x210 Fix by clearing the per-net pointer before the last reference is dropped. Fixes: f1327abd6abed ("RDMA/rxe: Support RDMA link creation and destruction per net namespace") Signed-off-by: Binbin Deng <18983559317@163.com> Link: https://patch.msgid.link/20260923051800.244740-1-18983559317@163.com Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev> Signed-off-by: Leon Romanovsky <leon@kernel.org>
2026-09-29RDMA/rtrs-clt: Reject invalid queue_depth from the peerQuanye Yang
queue_depth is taken from the server's CM private_data and later used as a session invariant. A peer can send 0, which the client stores and then trips WARN_ON() in create_con_cq_qp() when the next connection is set up. Reject a zero queue_depth on ESTABLISHED, same as a bad magic or version, and fail the handshake with -ECONNRESET. Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Reported-by: Farhad Alemi <farhad.alemi@berkeley.edu> Closes: https://lore.kernel.org/linux-rdma/CA+0ovCg_sG8gaZXXj9zmOrpxRt=8+-x9wvycVNUKwWmMbr6-Yg@mail.gmail.com Signed-off-by: Quanye Yang <quanyeyang@proton.me> Link: https://patch.msgid.link/20260922-rtrs-fix-warning-rtrs-clt-rdma-cm-handler-v1-1-2076c0ee1455@proton.me Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Leon Romanovsky <leon@kernel.org>
2026-09-29RDMA/nldev: Fix NULL deref in dumps of objects abandoned by DRIVER_FAILUREYili Zhang
fill_res_cq_entry() dereferences cq->uobject->uevent.uobject.context->res.id unconditionally for user resources. This is normally safe by ordering: destroy_hw() removes the resource from the restrack before uverbs_destroy_uobject() clears ->context, and the XA_ZERO_ENTRY marker set by rdma_restrack_begin_del() hides the entry from concurrent netlink dumps. The ordering breaks when a driver keeps failing to destroy an object during ucontext teardown. uverbs_destroy_ufile_hw() then falls back to __uverbs_cleanup_ufile(RDMA_REMOVE_DRIVER_FAILURE), which abandons the object in place: the HW object and its restrack entry are intentionally leaked, while the uobject bookkeeping is torn down and ->context is explicitly set to NULL by uverbs_destroy_uobject(). rdma_restrack_del() is never reached, so the orphaned entry stays in the device restrack with a valid kref, reachable by any subsequent netlink dump. Observed on 6.1.52 with MLNX_OFED 24.10, after an mlx5 FW failure left a process unable to tear down its CQ (destroy_cq FW command failing during FD close): WARNING: ... uverbs_destroy_ufile_hw+0xe3/0x100 BUG: kernel NULL pointer dereference, address: 0000000000000058 RIP: 0010:fill_res_cq_entry+0x15e/0x180 [ib_core] res_get_common_dumpit+0x304/0x530 [ib_core] nldev_res_get_cq_dumpit+0x1a/0x20 [ib_core] The faulting chain maps to the source (CR2 = 0x58): cq->uobject (struct ib_cq +0x08, res at +0x98) uobject->context (struct ib_uobject +0x10, NULL after abandon) context->res.id (struct ib_ucontext +0x58) The recent restrack rework (8d186210677c and its series) moved the restrack deletion to the start of the destroy flow and thus fences concurrent dumps from an object being destroyed, but it does not cover this case: when destroy fails, rdma_restrack_abort_del() restores the entry, and the RDMA_REMOVE_DRIVER_FAILURE sweep still never removes it from the restrack. From the fallback until the device is unregistered, any "rdma res show cq" deterministically takes the NULL pointer dereference; this is a long-lived state, NOT A RACE. The dump path holds neither the restrack lock (dropped before the fill callback runs) nor ufile->hw_destroy_rwsem, and rdma_restrack_get() only guarantees that the res memory stays alive, not that ->context is still valid. Fix the dump side: check the uobject context directly instead of the rdma_is_kernel_res() marker. A non-NULL uobject already implies a user resource, so kernel resources keep being skipped, and the additional ->context check skips the RES_CTXN attribute for orphaned entries instead of crashing the dump. The orphaned resource itself remains visible in "rdma res show" (cqn/cqe/usecnt/pid), which is what an operator needs after the accompanying uverbs WARN to diagnose the driver destroy failure. fill_res_pd_entry() has the same pattern (pd->uobject->context->res.id) and is fixed the same way; a PD can even reach the fallback without its own driver callback failing, e.g. uverbs_free_pd() returns -EBUSY while another object that failed to destroy still holds the PD usecnt. Fixes: c3d02788b45a ("RDMA/nldev: Provide parent IDs for PD, MR and QP objects") Signed-off-by: Yili Zhang <zhangyili01@baidu.com> Link: https://patch.msgid.link/20260923131239.6521-1-zhangyili01@baidu.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
2026-09-29reset: anlogic: add support for Anlogic DR1V90 resetsJunhui Liu
Add reset controller support for the Anlogic DR1V90 SoC, which is an auxiliary device associated with the Clock and Reset Unit (CRU). All resets are active-low. Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Brian Masney <bmasney@redhat.com>
2026-09-29clk: anlogic: add cru support for Anlogic DR1V90 SoCJunhui Liu
The Clock and Reset Unit (CRU) in the Anlogic DR1V90 SoC provides management for the clock and reset. The clock driver includes support for: - Generic clocks: fixed-factor, divider, mux and gate. - PLL: "nm" type (parent * n / m) and "c" type (parent / c). These PLLs are set up by the FSBL and mared as "don't touch" in the datasheet, so only the recal_rate() op is provided. - Divider with gate: support both division and gating (by setting value to 0); some of them require a minimum divider value to avoid timing issues. This also prepares the structure for the reset controller support, registering an auxiliary device for resets. Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech> Signed-off-by: Brian Masney <bmasney@redhat.com>
2026-09-29cxl/region: Warn on user region position mismatchAlison Schofield
User region creation includes a self-test that checks the assigned endpoint positions against the position calculation used by auto region creation. The result, matching or not, is reported with dev_dbg(). Promote that to a dev_warn() that fires only on a mismatch, so bugs in the auto region position calculation are easier to catch as that calculation is extended to support more region configurations. The matching case no longer prints, so dynamic debug on region.c no longer confirms that the self-test ran. Signed-off-by: Alison Schofield <alison.schofield@intel.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Reviewed-by: Robert Richter <rrichter@amd.com> Link: https://patch.msgid.link/1d662e3ea78ec8b05fceb500f04e69ee9f6d4a72.1788475206.git.alison.schofield@intel.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
2026-09-29RDMA/efa: Pass relaxed ordering flag to deviceDana Malachi
Accept the relaxed ordering access flag during memory region registration and forward it to the device firmware via the admin command path. Reviewed-by: Chen Brasch <cbrasch@amazon.com> Reviewed-by: Yonatan Nachum <ynachum@amazon.com> Signed-off-by: Dana Malachi <danamala@amazon.com> Signed-off-by: Michael Margolin <mrgolin@amazon.com> Link: https://patch.msgid.link/20260922160118.990-3-mrgolin@amazon.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
2026-09-29RDMA/efa: Use device ABI MR permissions instead of verbs flagsDana Malachi
Set MR permissions explicitly using device interface definitions rather than copying raw verbs access flags. This is needed for the next commit, to allow access flag bits that are not in the permissions field. Reviewed-by: Chen Brasch <cbrasch@amazon.com> Reviewed-by: Yonatan Nachum <ynachum@amazon.com> Signed-off-by: Dana Malachi <danamala@amazon.com> Signed-off-by: Michael Margolin <mrgolin@amazon.com> Link: https://patch.msgid.link/20260922160118.990-2-mrgolin@amazon.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
2026-09-29clk: si5351: fail prepare when PLL reset times outPengpeng Hou
The clock prepare path requests a PLL reset when the platform data requires a deterministic output phase. The reset helper logs polling errors but returns no status, so prepare still enables the output and reports success when the reset did not complete. Return the poll result to prepare, restore the output power-down bit on failure, and leave the output disabled. XTAL and CLKIN inputs continue to bypass PLL reset successfully. The issue was found by our static-analysis tool. Fixes: 5142cbcea324 ("clk: si5351: Wait for bit clear after PLL reset") Reviewed-by: Brian Masney <bmasney@redhat.com> Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou <hppiscas@163.com> Signed-off-by: Brian Masney <bmasney@redhat.com>
2026-09-29clk: mmp: allow COMPILE_TEST buildsRosen Penev
The MMP clock directory is only entered for ARCH_MMP, even though the PXA1908 and MMP2 audio clock symbols can already be selected for COMPILE_TEST. Add a hidden MMP clock family gate, select it from the compile-testable MMP clock symbols, and use that symbol for the parent Makefile descent. Keep ARCH_MMP as the default provider for existing platform builds. Tested with: make LLVM=1 ARCH=loongarch drivers/clk/mmp/ Assisted-by: Codex:GPT-5.5 Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Brian Masney <bmasney@redhat.com>
2026-09-29clk: validate spread spectrum configurationDario Binacchi
The spread spectrum configuration is passed to the provider's set_spread_spectrum() callback without any validation, as clk-conf.c only skips all-zero triplets from "assigned-clock-sscs". An invalid device tree can hand providers a zero modulation frequency or a spread ratio above 100%, and each provider would have to add the same checks to protect e.g. divisions in its rate computations. The KUnit test data for assigned-clock-sscs uses spread values of 30000 and 40000 permyriad (300% and 400%), which the new check rejects, as reported by Sashiko, so fix them to 300 and 400 (3% and 4%). Also use a realistic 6% value for the initial settings of the skip tests, for consistency. Fixes: c86814e70390 ("clk: Introduce clk_hw_set_spread_spectrum") Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://lore.kernel.org/r/20260901155657.6A5981F00A3A@smtp.kernel.org Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Signed-off-by: Brian Masney <bmasney@redhat.com>
2026-09-29clk: versaclock5: restore cache_only on regcache_sync() failure in resumebui duc phuc
If regcache_sync() fails in vc5_resume(), the function only logs the error, leaving regmap with cache_only disabled even though the register cache has not been synchronized with the hardware. Re-enable cache_only on failure to restore the state established by vc5_suspend(). Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Signed-off-by: Brian Masney <bmasney@redhat.com>
2026-09-29clk: rs9: restore cache_only on regcache_sync() failure in resumebui duc phuc
If regcache_sync() fails in rs9_resume(), the function only logs the error, leaving regmap with cache_only disabled even though the register cache has not been synchronized with the hardware. Re-enable cache_only on failure to restore the state established by rs9_suspend(). Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Signed-off-by: Brian Masney <bmasney@redhat.com>
2026-09-29clk: ti: adpll: unregister OF clock provider on removeMyeonghun Pak
ti_adpll_probe() registers the driver's onecell clock provider with of_clk_add_provider(). The remove path only frees the clock resources, leaving the provider registered after the backing data has been torn down. Unregister the OF clock provider before freeing the ADPLL resources so the provider no longer points at released driver data after device removal. Fixes: 21330497f303 ("clk: ti: Add support for dm814x ADPLL") Co-developed-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Ijae Kim <ae878000@gmail.com> Signed-off-by: Myeonghun Pak <mhun512@gmail.com> Signed-off-by: Brian Masney <bmasney@redhat.com>
2026-09-29clk: starfive: jh7110-isp: fix refcount leak in jh7110_ispcrg_probe()Wentao Liang
In jh7110_ispcrg_probe(), the error path for pm_runtime_get_sync() failure directly returns without releasing the runtime PM reference count. The call to __pm_runtime_resume() increments the usage count unconditionally before attempting to resume, and does not decrement it on failure. Thus the leaked reference makes it impossible to suspend the device later. All other error paths correctly jump to err_exit and call pm_runtime_put_sync(). Fix this by replacing pm_runtime_get_sync() with pm_runtime_resume_and_get(), which properly balances the reference count on error. Cc: stable@vger.kernel.org Fixes: 81279f5d0812 ("clk: starfive: Add StarFive JH7110 Image-Signal-Process clock driver") Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> Reviewed-by: Hal Feng <hal.feng@starfivetech.com> Signed-off-by: Brian Masney <bmasney@redhat.com>
2026-09-29clk: si521xx: restore cache_only on regcache_sync() failure in resumebui duc phuc
If regcache_sync() fails in si521xx_resume(), the function only logs the error, leaving regmap with cache_only disabled even though the register cache has not been synchronized with the hardware. Re-enable cache_only on failure to restore the state established by si521xx_suspend(). Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Signed-off-by: Brian Masney <bmasney@redhat.com>
2026-09-29clk: si521xx: simplify si521xx_diff_idx_to_reg_bit()Yury Norov
Switch the function to using fns(), and get rid of the double for-loop. Signed-off-by: Yury Norov <ynorov@nvidia.com> Signed-off-by: Brian Masney <bmasney@redhat.com>
2026-09-29Bluetooth: btintel_pcie: Add shared HW reset for clean startSai Teja Aluvala
Reset shared Bluetooth hardware after mapping the BAR and before setting up MSI-X interrupts, so stale device state is cleared before IRQ handlers and interrupt masks are configured. Propagate reset errors so probe aborts rather than continuing when the reset fails. Fixes: c2b636b3f788 ("Bluetooth: btintel_pcie: Add support for PCIe transport") Signed-off-by: Sai Teja Aluvala <aluvala.sai.teja@intel.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2026-09-29Bluetooth: btintel_pcie: fix TX descriptor bounds checkRavindra
btintel_pcie_prepare_tx() uses tfd_index to access the TFD and data buffer arrays before the index is advanced modulo txq->count. An index equal to txq->count is one past the end of both arrays, so reject it in the bounds check. Fixes: 6e65a09f9275 ("Bluetooth: btintel_pcie: Add *setup* function to download firmware") Signed-off-by: Ravindra <ravindra@intel.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2026-09-29platform/x86: serial-multi-instantiate: Add CLSA0102Ilya Pavlukhin
Instantiate both CS35L41 amplifiers of the CLSA0102 node found on the Lenovo Yoga Slim 7 Carbon 14ACN6 (82L0), the same way as for CLSA0100 and CLSA0101. Link: https://bugzilla.kernel.org/show_bug.cgi?id=215632 Assisted-by: Claude Opus 5 Signed-off-by: Ilya Pavlukhin <i.pavluhin@ya.ru> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260920092808.17234-3-i.pavluhin@ya.ru
2026-09-29ACPI: scan: Add CLSA0102 to the serial bus ignore listIlya Pavlukhin
The Lenovo Yoga Slim 7 Carbon 14ACN6 (82L0) describes the two CS35L41 amplifiers of its bass speakers as a single ACPI node, HID CLSA0102, with two I2cSerialBusV2 resources (0x40 and 0x41), like CLSA0100 and CLSA0101 on the Legion 7. Skip the default I2C enumeration so that serial-multi-instantiate can create a client for each amplifier. Link: https://bugzilla.kernel.org/show_bug.cgi?id=215632 Assisted-by: Claude Opus 5 Signed-off-by: Ilya Pavlukhin <i.pavluhin@ya.ru> Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260920092808.17234-2-i.pavluhin@ya.ru
2026-09-29drm/ssd130x: Set the address window in ssd132x_clear_screen()Fabio Piparo
ssd132x_clear_screen() writes a full screen of data without setting the column and row ranges first, unlike ssd130x_clear_screen(). The clear is not reachable today: the plane disable returns before it, and the encoder is powered down by then. Factor the range commands into ssd132x_set_col_range() and ssd132x_set_row_range() and use them from ssd132x_update_rect() and ssd132x_clear_screen(). Assisted-by: LLM Signed-off-by: Fabio Piparo <holofermes@gmail.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patch.msgid.link/20260922225445.1525837-1-holofermes@gmail.com Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2026-09-29pwm: Allow 32-bit tasks to use the character deviceDanish Khateeb
pwm_cdev_fileops has no .compat_ioctl, so every ioctl on /dev/pwmchipN fails with -ENOTTY for 32-bit tasks on a 64-bit kernel, e.g. armhf userspace on arm64. struct pwmchip_waveform has the same layout for 32-bit and 64-bit tasks, so compat_ptr_ioctl() is enough. PWM_IOCTL_REQUEST and PWM_IOCTL_FREE take an integer rather than a pointer, which is fine too: compat_ptr() only changed the value on s390, which dropped compat support in v6.19. Fixes: 9c06f26ba5f5 ("pwm: Add support for pwmchip devices for faster and easier userspace access") Assisted-by: LLM Signed-off-by: Danish Khateeb <danishkhateeb03@gmail.com> Link: https://patch.msgid.link/20260928184422.380520-1-danishkhateeb03@gmail.com Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
2026-09-29mmc: Merge branch fixes into nextUlf Hansson
Merge the mmc fixes for v7.3-rc[n] into the next branch, to allow them to get tested together with the mmc changes that are targeted for the next release. Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-09-29IB/mad: fix UAF and double-free in RMPP receive reassemblyDairui Zhang
mad_rmpp_recv.state is protected by two locks that do not exclude each other: recv_timeout_handler() (port workqueue) uses agent->lock, continue_rmpp() (CQ softirq) uses rmpp_recv->lock. Nothing serializes the check-then-set sequence on the state word: T1 (CQ softirq) T2 (port workqueue) continue_rmpp() lock(rmpp_recv->lock) state == ACTIVE [passes] recv_timeout_handler() lock(agent->lock) state = TIMEOUT list_del(&rmpp_recv->list) unlock(agent->lock) destroy_rmpp_recv() wait_for_completion() [blocks on T1's ref] state = COMPLETE unlock(rmpp_recv->lock) complete_rmpp() queue cleanup_work (+10s) deref() [unblocks] kfree(rmpp_recv) ib_free_recv_mad(done_wc) +10s: recv_cleanup_handler() runs lock/list_del/destroy on the freed rmpp_recv -> UAF write and double free; nothing can cancel that cleanup_work anymore, the entry is already off agent->rmpp_list. done_wc is also returned to ib_mad_complete_recv() and freed again -> UAF read and double free. Reaching this requires sending MADs to a kernel RMPP agent from the InfiniBand/RoCE fabric: the per-port sa_query agent accepts subnet manager responses whose SLID/GID/TID are not authenticated on the fabric, and legacy user_mad agents registered without IB_USER_MAD_USER_RMPP start reassembly on any incoming RMPP DATA MAD with an attacker-chosen TID, no in-flight send required. The attacker controls segment timing and can run many transactions in parallel (agent->rmpp_list has no cap), so landing the microseconds-wide receive critical section on the 40-second timeout boundary is a matter of patience, not luck. Unify state transitions under rmpp_recv->lock in recv_timeout_handler(), keeping list manipulation under agent->lock (which preserves the agent->lock -> rmpp_recv->lock ordering used by continue_rmpp()). State check/set in both paths is then serialized, so the loser of the race always observes the final state and bails out. recv_cleanup_handler() needs no change: with transitions serialized, a cleanup_work can only be pending after COMPLETE, in which case the timeout handler exits early. The race is as old as the RMPP implementation itself. Fixes: fa619a77046b ("[PATCH] IB: Add RMPP implementation") Assisted-by: LLM Signed-off-by: Dairui Zhang <zhangdairui@gmail.com> Link: https://patch.msgid.link/20260922152342.1474845-1-zhangdairui@gmail.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
2026-09-29Merge tag 'icc-7.3-rc5' of ↵Greg Kroah-Hartman
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-linus Georgi writes: interconnect fix for v7.3-rc This contains a revert that resolves a boot failure and instability on some Snapdragon X Elite machines (based on Hamoa and Purwa). - Revert "interconnect: qcom: x1e80100: enable QoS configuration" Signed-off-by: Georgi Djakov <djakov@kernel.org> * tag 'icc-7.3-rc5' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc: Revert "interconnect: qcom: x1e80100: enable QoS configuration"