summaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)AuthorFilesLines
2026-08-17vxlan: keep the last remote linked during FDB flushKyle Zeng1-4/+5
A non-nexthop FDB entry is expected to have at least one remote while it remains reachable through the FDB hash table. A filtered bulk flush violates this invariant when every remote matches: It unlinks the last remote in vxlan_fdb_dst_destroy() and only afterwards tells vxlan_flush() to destroy the parent FDB entry. An RCU reader can find the parent during this interval. first_remote_rcu() then applies list_entry_rcu() to the empty list head, producing an invalid remote pointer that the receive learning path can read from and write to. When a matching remote is the sole remaining remote, leave it linked and ask the caller to destroy the entire FDB entry. vxlan_fdb_destroy() keeps the remote attached while sending the deletion notification and removing the parent from the lookup structures. Fixes: c499fccb71cb ("vxlan: vxlan_core: Support FDB flushing by destination VNI") Cc: stable@vger.kernel.org Signed-off-by: Kyle Zeng <kylebot@openai.com> Co-developed-by: David Lee <david.lee@trailofbits.com> Signed-off-by: David Lee <david.lee@trailofbits.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20260810144115.821654-1-david.lee@trailofbits.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17ionic: fix completion descriptor access with 2x desc sizePrabu Thayalan1-13/+14
The old ionic_rx_service() and ionic_tx_service() used array indexing to access completion descriptors: comp = &((struct ionic_rxq_comp *)cq->base)[cq->tail_idx]; This assumes the stride is sizeof(struct ionic_rxq_comp) = 16 bytes. However, when the IONIC_Q_F_2X_CQ_DESC flag is set, the actual completion descriptor size is 32 bytes (2 * sizeof(comp)), and the completion itself is located at the end of that 32-byte slot. Array indexing with a 16-byte stride would access the wrong offset. Use pointer arithmetic that accounts for the actual descriptor size from cq->desc_size: comp = cq->base + cq->desc_size * cq->tail_idx + cq->desc_size - sizeof(*comp); This correctly calculates the completion location regardless of descriptor size. For the common case where desc_size equals sizeof(*comp), use array indexing in a likely() fast path to avoid performance regression. Fixes: 65e548f6b0ff ("ionic: remove the cq_info to save more memory") Signed-off-by: Prabu Thayalan <prabu.ponrajthayalan@amd.com> Signed-off-by: Eric Joyner <eric.joyner@amd.com> Reviewed-by: Brett Creeley <brett.creeley@amd.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260811195039.1315045-3-eric.joyner@amd.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17ionic: add missing dma_rmb() after the completion publish checkEric Joyner2-0/+8
Each completion service routine tests a device-written publish flag and then reads the rest of the descriptor with nothing ordering those loads. A control dependency does not order loads, so a weakly ordered CPU may satisfy the payload reads from a cache line state observed before the flag became valid. Add the barrier to all four completion paths. Fixes: 1d062b7b6f64 ("ionic: Add basic adminq support") Fixes: 0f3154e6bcb3 ("ionic: Add Tx and Rx handling") Fixes: 77ceb68e29cc ("ionic: Add notifyq support") Signed-off-by: Eric Joyner <eric.joyner@amd.com> Reviewed-by: Brett Creeley <brett.creeley@amd.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260811195039.1315045-2-eric.joyner@amd.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17net: usb: qmi_wwan: add Telit Cinterion FE990D50 compositionFabio Porcedda1-0/+1
Add the followin Telit Cinterion FE990D50 composition: 0x0991: rmnet + tty (AT/NMEA) + tty (AT) + tty (AT) + tty (AT) + tty (diag) + ADPL + adb T: Bus=01 Lev=01 Prnt=01 Port=06 Cnt=03 Dev#= 10 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1bc7 ProdID=0991 Rev=06.06 S: Manufacturer=Telit Cinterion S: Product=FE990 S: SerialNumber=2aa802d2 C: #Ifs= 9 Cfg#= 1 Atr=e0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=03(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#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=04(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#= 4 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=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8a(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none) E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none) E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 8 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms Cc: stable@vger.kernel.org Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Reviewed-by: Breno Leitao <leitao@debian.org> Link: https://patch.msgid.link/20260812054911.447887-1-Fabio.Porcedda@telit.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17net: ibm: emac: mal: fix NAPI lockingRunyu Xiao1-3/+10
Since commit 413f0271f396 ("net: protect NAPI enablement with netdev_lock()"), napi_enable() and napi_disable() take netdev_lock(). mal_register_commac() and mal_unregister_commac() call these helpers while holding mal->lock with interrupts disabled. In the unregister path, napi_disable() may also wait for polling to finish, while the poll completion path takes mal->lock. Take netdev_lock() before mal->lock, use the locked NAPI helpers, and drop mal->lock before napi_disable_locked(). Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()") Cc: stable@vger.kernel.org Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260811070813.377573-1-runyu.xiao@seu.edu.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17hinic3: Fix skb linearization mismatch and drop skb when skb_checksum_help() ↵Fan Gong1-3/+6
failed Previously, hinic3_send_one_skb() cached the skb fragment count before calling hinic3_tx_offload(). If hinic3_tx_csum() falls back to skb_checksum_help() for unsupported tunnel packets, the skb may be linearized. Continuing to build the TX descriptor with the stale fragment count leads to a descriptor mismatch, which can trigger out-of-bounds DMA reads or IOMMU faults. Furthermore, the old code ignored the return value of skb_checksum_help(), transmitting corrupted packets with incomplete checksums upon failure. Fix this by: 1. Moving the hinic3_tx_offload() call before calculating 'num_sge' to ensure the correct fragment count is used if the SKB is linearized. 2. Propagating skb_checksum_help() errors and returning HINIC3_TX_OFFLOAD_INVALID to properly drop the skb. Fixes: 17fcb3dc12bb ("hinic3: module initialization and tx/rx logic") Co-developed-by: Teng Peisen <tengpeisen@huawei.com> Signed-off-by: Teng Peisen <tengpeisen@huawei.com> Co-developed-by: Wu Di <wudi234@huawei.com> Signed-off-by: Wu Di <wudi234@huawei.com> Signed-off-by: Fan Gong <gongfan1@huawei.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/78d8c61cab588240948eaddcb437d59add9f77ae.1786448013.git.tengpeisen@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17net: airoha: npu: load the firmware without the sysfs fallbackVitaliy Sochnev1-4/+6
airoha_npu_load_firmware() maps a missing firmware file to -EPROBE_DEFER so that the NPU can be brought up once the rootfs carrying /lib/firmware has been mounted. That mapping holds only as long as request_firmware() reports -ENOENT. It does not when the sysfs fallback is in play. With CONFIG_FW_LOADER_USER_HELPER_FALLBACK set, or with the fallback armed at runtime through /proc/sys/kernel/firmware_config/force_sysfs_fallback, request_firmware() hands the request to a userspace helper, waits out the full loading_timeout and returns -ETIMEDOUT. The -ENOENT test no longer matches, dev_err_probe() turns the result into a hard failure, and the NPU is left unbound after stalling the boot for 60 seconds: airoha-npu 1e900000.npu: Direct firmware load for airoha/en7581_npu_rv32.bin failed with error -2 airoha-npu 1e900000.npu: Falling back to sysfs fallback for: airoha/en7581_npu_rv32.bin airoha-npu 1e900000.npu: error -ETIMEDOUT: failed to run npu firmware airoha-npu 1e900000.npu: probe with driver airoha-npu failed with error -110 Clearing FW_LOADER_USER_HELPER in the configuration is not a dependable guard against this, because unrelated drivers select it. On the affected build the symbol was turned back on by LEDS_LP55XX_COMMON, even though the platform had explicitly disabled it. Use request_firmware_direct() instead. It sets FW_OPT_NOFALLBACK_SYSFS, so a missing file is reported as -ENOENT whatever the firmware loader is configured to do, and the deferred probe path works as intended. Two consequences are worth stating plainly. The helper is not merely bypassed for the boot-before-rootfs case. fw_run_sysfs_fallback() returns early on FW_OPT_NOFALLBACK_SYSFS, so this driver's firmware requests can no longer be served by a usermode helper at all, including on a system where that is the only delivery route; having no second firmware source, the driver would defer forever there. That is a deliberate trade-off: the -ENOENT to -EPROBE_DEFER mapping was written to wait for a filesystem, and the sysfs helper interface has had no in-tree consumer since udev dropped firmware loading. request_firmware_direct() also sets FW_OPT_NO_WARN, which drops the only message naming the file that failed to load. Report it from the driver instead, so the name lands in the deferred probe reason and shows up in the "deferred probe pending" line emitted at driver_deferred_probe_timeout. The generic report in airoha_npu_probe() goes away with it, since it would otherwise overwrite that reason with a message naming nothing; of the paths it covered, devm_ioremap_resource() reports itself and the malformed firmware-name property now does too. Measured on a Nokia XG-040G-MD with FW_LOADER_USER_HELPER=y and FW_LOADER_USER_HELPER_FALLBACK=y forced on, two images from the same tree differing only by this patch: without: fallback at 2.477s -> -ETIMEDOUT at 64.555s -> probe failed with -110, preinit at 69.6s, NPU unbound with: no fallback, NPU fw version 1456.62 at 3.665s, preinit at 7.6s Cc: stable+noautosel@kernel.org # never worked Signed-off-by: Vitaliy Sochnev <sochnev.v.74@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17net: stmmac: convert DMA address to lower 32 before assignmentAlex Elder2-9/+9
In jumbo_frm() (implemented in both "chain_mode.c" and "ring_mode.c"), there are places where a DMA descriptor is converted to little-endian byte order in assignment. The DMA descriptor could be a 64-bit value, which makes the 32-bit byte swapping operation seem a little sketchy. Explicitly extract the low-order 32 bits of the dma_addr_t value being converted into a u32 so it's crystal clear that we're doing the right thing. Suggested-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: Alex Elder <elder@riscstar.com> Link: https://patch.msgid.link/20260812163832.271742-3-elder@riscstar.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17net: stmmac: use dma_addr_t for DMA addressesAlex Elder2-2/+4
In jumbo_frm() (implemented in both "chain_mode.c" and "ring_mode.c"), an unsigned integer local variable is used to hold the value returned by dma_map_single(). On systems where a dma_addr_t is 64 bits, the subsequent dma_mapping_error() check of the returned value operates only on the low 32 bits (whose high bit won't be sign-extended). In this case, dma_mapping_error() would return 0 (no error) even if there were one. Fix this in both spots by using a dma_addr_t for the local variable. Reported-by: Sashiko <sashiko-bot@kernel.org> Link: https://lore.kernel.org/linux-devicetree/20260606010122.21A211F00899@smtp.kernel.org/ Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: Alex Elder <elder@riscstar.com> Link: https://patch.msgid.link/20260812163832.271742-2-elder@riscstar.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17net: thunderbolt: Mark the connection down when bringing it up failsFan Ye1-0/+10
Every failure path in tbnet_connected_work() undoes its own work and returns without clearing login_sent, so the connection still looks established. The next tbnet_tear_down() therefore takes its main branch and repeats a teardown that already happened: it stops rings that are already stopped, which is a dev_WARN() and fatal under panic_on_warn, and it releases net->remote_transmit_path even on the HopID mismatch path, where this connection never owned that id, silently freeing one that someone else is still using. Clear login_sent on those paths. That is enough for tbnet_tear_down() to leave the unwound state alone, and login_received has to stay set: it records that the peer has logged in and carries the transmit path it gave us, which nothing on this side can make the peer send again. Two things change beyond keeping the teardown out of the way: the logout request in that block is no longer sent, and the peer's next login request now re-queues our login work rather than connected_work, giving the connection a fresh login instead of a retry on stale state. Fixes: e69b6c02b4c3 ("net: Add support for networking over Thunderbolt cable") Cc: <stable@vger.kernel.org> # 5.13+ Signed-off-by: Fan Ye <fy15309206903@gmail.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260811-b4-tbnet-hopid-v3-2-9e75d1b51331@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17net: thunderbolt: Release the Rx HopID that was handed out on mismatchFan Ye1-0/+2
tb_xdomain_alloc_in_hopid() passes the wanted HopID to ida_alloc_range() as the lower bound, so a taken id is not an error there: the allocator returns the next free one above it. tbnet_connected_work() asks for the peer's transmit path, treats any other id as a failure and returns without releasing what it got, so that allocation stays live for the rest of the XDomain connection with nothing left holding a reference to it. Release the id when it is not the one we asked for, the same way the error unwind at the end of the function releases the expected one. Fixes: 180b0689425c ("thunderbolt: Allow multiple DMA tunnels over a single XDomain connection") Cc: stable@vger.kernel.org Signed-off-by: Fan Ye <fy15309206903@gmail.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260811-b4-tbnet-hopid-v3-1-9e75d1b51331@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17octeontx2-af: initialize lmac_bmap in rvu_mcs_set_lmac_bmap()Karl Mehltretter1-1/+1
rvu_mcs_set_lmac_bmap() declares lmac_bmap without initializing it and only sets bits for valid lmacs with set_bit(), which ORs into the word without clearing it first. Bits for invalid or skipped ports keep whatever was on the stack, and the garbage is stored into mcs->hw->lmac_bmap. Initialize lmac_bmap to 0 so only valid lmacs are marked. Found with Clang's -Wconditional-uninitialized. Fixes: ca7f49ff8846 ("octeontx2-af: cn10k: Introduce driver for macsec block.") Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Reviewed-by: Ratheesh Kannoth <rkannoth@marvell.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260812060730.6181-1-kmehltretter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17octeontx2-af: Add mailbox to read default MCAM entrySatheesh Paul2-0/+39
Add support for reading the default unicast MCAM rule associated with a NIX LF on non-CN20K silicon. Signed-off-by: Satheesh Paul <psatheesh@marvell.com> Signed-off-by: Nitin Shetty J <nshettyj@marvell.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260812053523.3329305-1-nshettyj@marvell.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17bnxt_en: Add missing NETIF_F_TSO_ECN feature flagMichael Chan1-2/+2
All bnxt devices support TSO packets with RFC 3168 ECN flags set. The CWR flag is replicated only on the first segment. Reviewed-by: Andy Gospodarek <gospo@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20260814215655.2331655-1-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17eth: bnxt: preserve IRQ affinity across IRQ reallocationJakub Kicinski2-26/+80
Reconfiguring the rings frees the MSI-X vectors and allocates them again. The IRQ descriptors go away with them, so the affinity user space set is silently replaced by the driver's default NUMA spread. This is painful to deal with for user space as seemingly arbitrary NIC configuration changes lead to loss of configuration. In NIPA (netdev CI) this results in the toeplitz test reporting: Exception| net.lib.py.ksft.KsftFailEx: IRQ170 is not mapped to a single core: 0-31 if the test run after another test which reconfigured the device. We configure the IRQ mapping at boot, but if the driver is not preserving the config - it gets lost. Record the affinity in the notifier and apply it when the IRQs are requested again. The notifier has to be registered unconditionally now, so far it was only installed when TPH was enabled. Drivers which let the core manage the affinity (idpf, ice, iavf via netif_set_affinity_auto()) work exactly like this, napi_restore_config() reapplies napi_config.affinity_mask on every napi_enable(). Note that the affinity is supposed to follow the NAPI / queue, same as the napi_config behavior in drivers mentioned above. If the user changes the affinity when the device is down - we will override it on up. That's expected, the IRQs are not associated with queues when device is down (no name, no entry in /proc/interrupts, no entry in netdev netlink). map_idx is ulp_msix + i, so the slot shifts whenever RoCE takes or releases vectors and the mask would end up on a different ring. Key using the completion ring id, which maps to the NAPI instance. Note2: this restores the side effect fcf42409c6e1 ("bnxt_en: use irq_update_affinity_hint()") removed, but not the problem it was fixing. The complaint there was that reopening the device resets the affinity and can move an IRQ onto a CPU irqbalance was told to stay away from. We now replay what user space or irqbalance last asked for, the driver's own placement is only used for a ring nobody has configured. Note3: the combined irq_set_affinity_and_hint() looks like it may hide the failure from __irq_set_affinity(), but let's assume the IRQ maintainers know what their doing - either this can't happen or is intentional. Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Link: https://patch.msgid.link/20260813193248.2578626-3-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17eth: bnxt: decrease indent in bnxt_init_int_mode()Jakub Kicinski1-18/+18
Handle the IRQ table allocation failure right away instead of wrapping the rest of the function in an if. Purely to make upcoming changes more readable. While refactoring, drop the init of rc which is not necessary. No functional changes. Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com> Link: https://patch.msgid.link/20260813193248.2578626-2-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17r8169: keep LED device name valid after setupZhixing Chen1-6/+5
rtl8168_setup_ldev() and rtl8125_setup_led_ldev() build the LED device name in a stack buffer and assign it to led_cdev->name. The LED class device registration path reads led_cdev->name after it has been assigned, and struct led_classdev stores the name as part of the LED class device state. Do not keep a pointer to a setup function's stack buffer there. Store the name in struct r8169_led_classdev instead, so it remains valid for the lifetime of the LED class device. Signed-off-by: Zhixing Chen <running910@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20260813100711.14724-1-running910@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17net: add READ_ONCE()/WRITE_ONCE() annotations for dev->num_tcEric Dumazet8-16/+18
Several fast-path and control-path lockless readers access dev->num_tc (e.g., skb_tx_hash(), netdev_txq_to_tc(), netdev_get_num_tc(), and qdisc/driver lookups) while concurrent writers update dev->num_tc during TC setup, device reset, or channel configuration. Add READ_ONCE() and WRITE_ONCE() annotations to prevent compiler reordering and load/store tearing when accessing dev->num_tc. Update inline helpers in netdevice.h (netdev_get_num_tc(), netdev_set_prio_tc_map(), and netdev_get_sb_channel()) as well as writers and lockless readers in core networking code and drivers. Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20260812085440.3917924-3-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17net: prevent torn reads in netdev_tc_txqEric Dumazet6-14/+31
netdev_set_tc_queue() (and related helpers/drivers such as netdev_bind_sb_channel_queue(), netdev_reset_tc(), and netdev_unbind_sb_channel()) perform separate 16-bit writes to dev->tc_to_txq[tc].count and dev->tc_to_txq[tc].offset. Furthermore, memset() in netdev_reset_tc() and netdev_unbind_sb_channel() provides no guarantee of performing full 32-bit word stores. Concurrent lockless readers (e.g. skb_tx_hash(), netdev_txq_to_tc(), ixgbe_select_queue(), taprio, mqprio, FPE drivers) can observe torn values where offset and count belong to inconsistent configurations. Redefine struct netdev_tc_txq to embed count and offset inside a union with a u32 combined field, allowing atomic manipulation via READ_ONCE() and WRITE_ONCE(). Update all lockless readers and writers across the kernel to use READ_ONCE() and WRITE_ONCE() on the combined field. Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20260812085440.3917924-2-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-17can: m_can: pci: Remove driver_dataMarkus Schneider-Pargmann (The Capable Hub)1-3/+3
driver_data is set to M_CAN_CLOCK_FREQ_EHL for all models. This change was already five years ago, I don't expect any follow up models that need to set a different frequency through the driver_data at this point. Hardcode the M_CAN_CLOCK_FREQ_EHL. Once there are new models we can evaluate what data needs to be in driver_data. Acked-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Signed-off-by: Markus Schneider-Pargmann (The Capable Hub) <msp@baylibre.com> Reviewed-by: Vincent Mailhol <mailhol@kernel.org> Link: https://patch.msgid.link/20260515-topic-mcan-pci-driverdata-v7-1-v2-1-e33e014ff328@baylibre.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2026-08-17drivers: gs_usb: gs_usb_probe(): fix typo in error messageFanbo He1-1/+1
Fix typo in the error messag. Signed-off-by: Fanbo He <hefanbo@gmail.com> Link: https://patch.msgid.link/20260702031306.18988-1-hefanbo@gmail.com [mkl: add commit message] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2026-08-17can: m_can: Use of_property_present() for wakeup-sourcebui duc phuc1-1/+1
The 'wakeup-source' property is declared as a phandle-array in both YAML bindings and Device Tree source files. However, the driver currently uses of_property_read_bool() to check for its existence. According to the function's documentation, usage on non-boolean property types is deprecated. Switch to of_property_present() to comply with the recommended API for checking the presence of a property. Fixes: 04d5826b074e ("can: m_can: Map WoL to device_set_wakeup_enable") Reviewed-by: Kendall Willis <k-willis@ti.com> Acked-by: Markus Schneider-Pargmann <msp@baylibre.com> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260708030512.8570-1-phucduc.bui@gmail.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2026-08-17can: vxcan: support per-netns device unregistration.Kuniyuki Iwashima1-11/+15
Currently, vxcan_dellink() unregisters both local and peer devices synchronously under RTNL. Once RTNL is removed, it can be called concurrently from different netns. Let's use xchg() and unregister_netdevice_queue_net() to support per-netns device unregistration. This way, each device is queued for destruction only once by the winner of the race. Note that the extra netdev_hold() ensures that @peer obtained by the first xchg() is not freed during the subsequent access to netdev_priv(peer). The 2nd xchg() overwrites @dev to balance the refcount. Tested: 1. Create two vxcan pairs (vxcan1-2, vxcan3-4) between two netns (ns1 & ns2). # ip netns add ns1 # ip netns add ns2 # ip -n ns1 link add vxcan1 type vxcan peer vxcan2 netns ns2 # ip -n ns1 link add vxcan3 type vxcan peer vxcan4 netns ns2 2. Run bpftrace to check if the same process does NOT unregister the paired vxcan devices # bpftrace -e '#include <linux/netdevice.h> kprobe:free_netdev { $dev = (struct net_device *)arg0; printf("PID: %d | DEV: %s%s\n", pid, $dev->name, kstack()); }' 3. Remove vxcan2 in ns2 and check bpftrace output # ip -n ns2 link del vxcan2 PID: 1524 | DEV: vxcan2 free_netdev+5 netdev_run_todo+4798 rtnl_dellink+1507 rtnetlink_rcv_msg+1791 netlink_rcv_skb+504 ... PID: 453 | DEV: vxcan1 free_netdev+5 netdev_run_todo+4798 process_scheduled_works+2538 worker_thread+1906 kthread+806 ret_from_fork+805 ret_from_fork_asm+17 4. Remove ns2 (thus vxcan4) and check bpftrace output # ip netns del ns2 PID: 12 | DEV: vxcan4 free_netdev+5 netdev_run_todo+4798 default_device_exit_batch+2271 ops_undo_list+993 cleanup_net+1122 process_scheduled_works+2538 worker_thread+1906 kthread+806 ret_from_fork+805 ret_from_fork_asm+17 ... PID: 462 | DEV: vxcan3 free_netdev+5 netdev_run_todo+4798 process_scheduled_works+2538 worker_thread+1906 kthread+806 ret_from_fork+805 ret_from_fork_asm+17 Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20260731231755.2474376-1-kuniyu@google.com [mkl: fix indention struct vxcan_priv::peer_tracker] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2026-08-17can: rockchip: add RK3588 CAN supportCunhao Lu3-2/+34
Add support for the RK3588 CAN controller by introducing a dedicated model ID and OF match entry. The block is closely related to the existing RK3568 variants, but it cannot reuse their match data unchanged. In particular, RK3588 encodes RX_FIFO_CNT in bits 7:5 instead of 6:4, so the RX path needs SoC-specific handling. The RX FIFO count bitfield difference was found by comparing Rockchip's vendor kernel 6.1 CAN support for RK3568 and RK3588. Runtime testing on RK3588 also confirms that bits 7:5 are needed. Enable the existing erratum 5 empty-FIFO workaround for RK3588. Heiko reproduced erratum 6 on RK3588, so enable that workaround as well. CAN-FD is enabled for RK3588. The BRS bus-off issue seen in earlier testing was caused by the transmit delay compensation setting. With RKCANFD_REG_TRANSMIT_DELAY_COMPENSATION programmed to 0 on RK3588, CAN-FD with BRS works in local testing. Tested on an embedfire,rk3588-lubancat-5io board with can0/can1 directly connected, no other device on the bus, 60 Ohm bus termination, and a 300 MHz CAN clock. Runtime testing used 500 kbit/s arbitration bitrate and 1, 3 and 5 Mbit/s data bitrates. The 5 Mbit/s data phase test ran for 15 minutes with cangen using BRS and cansequence on the receiver. Both interfaces reported 9528377 packets and 150667356 bytes, with 0 bus-errors, 0 error-warn, 0 error-pass and 0 bus-off events. Co-developed-by: Heiko Stuebner <heiko.stuebner@cherry.de> Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de> Tested-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Cunhao Lu <1579567540@qq.com> Link: https://patch.msgid.link/tencent_207E464D12344B3228096E23A001D6882508@qq.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2026-08-17can: tcan4x5x: put tcan into sleep when removing driverSean Nyekjaer1-4/+27
Put the tcan4x5x transceiver into sleep mode when the driver is removed, instead of leaving it in its current operating mode. This reduces power consumption(3mA@12V) once the driver is no longer bound to the device. Signed-off-by: Sean Nyekjaer <sean@geanix.com> Link: https://patch.msgid.link/20260805110708.3220251-1-sean@geanix.com [mkl: tcan4x5x_power_enable(): reduce scope of ret] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2026-08-17net: ionic: Fetch RCQ sign bit from firmwareAbhijit Gangurde1-1/+5
Read the rcq_sign_bit from the RDMA LIF identity reported by firmware. Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com>
2026-08-16wifi: mt76: mt7921: refactor regd update to fix recursive mutex deadlockCharlie-cy Wu3-12/+22
Split mt7921_mcu_regd_update() into two functions to prevent recursive mutex acquisition. Introduce __mt7921_mcu_regd_update() as the internal implementation that assumes the mutex is already held by the caller, while mt7921_mcu_regd_update() remains as the external interface that handles mutex acquisition and release. This fixes a deadlock issue when mt7921_regd_set_6ghz_power_type() is called with the device mutex already held. Without this change, calling mt7921_mcu_regd_update() would attempt to acquire the same mutex again, causing a recursive lock deadlock. The __mt7921_mcu_regd_update() function can be safely called when the caller has already acquired the device mutex, avoiding the deadlock while maintaining proper synchronization for regulatory domain updates. Fixes: dc2608cf5224 ("wifi: mt76: mt7921: refactor regulatory notifier flow") Signed-off-by: Charlie-cy Wu <Charlie-cy.Wu@mediatek.com> Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com> Tested-by: Devin Wittmayer <lucid_duck@justthetip.ca> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-08-14net/mlx5: SD, prefer sd_group_size from vport contextShay Drory3-37/+45
Newer FW reports the SD group size directly in the NIC vport context via the sd_group_size field, gated by the sd_group_size capability. Switch sd_init() to source the group size from there and fall back to the MPIR-based host_buses query only when the cap is absent. sd_group_size might return 1 in some FW configuration. Add explicit check to disable SD creation in this case. While here, rename host_buses to group_size throughout sd.c to follow the new name on capable FW. Signed-off-by: Shay Drory <shayd@nvidia.com> Reviewed-by: Moshe Shemesh <moshe@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260810093037.3138197-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-14Merge tag 'nf-next-26-08-10' of ↵Jakub Kicinski2-2/+12
git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net This includes an enhancement to detect ct memleaks easier via DEBUG_NET and flowtable preparation patches for IPv4 over IPV6 and vice-versa. This also includes a fix for the nft_ct custom expectation support. 1) Add DEBUG_NET_WARN_ON_ONCE to nf_ct_set() to spot ct memleaks. 2) Pass struct net_device_path_ctx to dev_fill_forward_path() to make it easier to pass more parameters to this function. From Lorenzo Bianconi. 3) Add ether_type field to net_device_path context structucture. 4) Rename tun.l3_proto field to tun.inner_proto. 5) Rename ctx.tun.proto to ctx.tun.inner_proto. 6) Store ether_type in flowtable context. 7) Move IPv4 and IPv6 xmit path to a helper function. 8) Move encapsulation header parser out of the flowtable lookup function. 9) Rework nft_ct custom expectation support to address a possible reallocation of ct extension area while expectation list also contains expectations. Move datapath to a ct helper to fix it. 10) Ensure timeout is always lowered for the non-closing RST case in the TCP connection tracking. 11) Bail out when inserting already dead expectation, this should not ever happen, hence report it via DEBUG_NET. 12) Comestic updates for improving the conntrack selftest dump and flush userspace program, from Qingshuang Fu. * tag 'nf-next-26-08-10' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next: selftests: netfilter: conntrack_dump_flush: remove unused variables and fix typo netfilter: nf_conntrack_expect: bail out on insert dead expectations netfilter: conntrack: always lower timeout for non-closing RST packets netfilter: nft_ct: move custom expectation support to helper netfilter: flowtable: detach layer 2 encapsulation parser from lookup netfilter: flowtable: move ipv4 and ipv6 xmit path to function netfilter: flowtable: store ethertype in flowtable context netfilter: flowtable: rename ctx.tun.proto to ctx.tun.inner_proto netfilter: flowtable: rename tun.l3_proto to tun.inner_proto net: netfilter: add ether_type to net_device_path_ctx and use it net: pass net_device_path_ctx to dev_fill_forward_path() netfilter: add DEBUG_NET_WARN_ON_ONCE to skb_set_nfct() ==================== Link: https://patch.msgid.link/20260810194015.932627-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-13net: usb: lg-vl600: fix Ethernet header on fragmented RX packetsXu Rao1-1/+1
The LG VL600 RX path can assemble one device frame from multiple USB RX URBs. In the single-URB case, the input skb passed by usbnet is also the buffer being parsed, so @skb and @buf point to the same skb. When a frame is completed from current_rx_buf, however, @buf points to the assembled skb while @skb still points to the last URB fragment. vl600_rx_fixup() returns @buf to the network stack in that path, but it currently obtains the Ethernet header from @skb. As a result, the source/destination address fixups and the IPv6 ethertype fixup can be applied to the final fragment instead of the assembled skb that is actually delivered. Use @buf for the Ethernet header so the fixups are applied to the packet being parsed and returned. This has likely gone unnoticed because the common single-URB path has @skb == @buf and therefore behaves correctly. Cc: stable+noautosel@kernel.org # untested fix to unlikely driver error path Signed-off-by: Xu Rao <raoxu@uniontech.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/30CC616506DE5BC4+20260810084435.2099229-1-raoxu@uniontech.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-13net: phylink: treat PSGMII as an inband capable interfaceSandeep Sondagar1-0/+3
PSGMII (the Qualcomm 5-port SGMII) conveys the link negotiation result from the PHY back to the MAC through per-channel in-band SGMII words, exactly like SGMII and QSGMII. However, PHY_INTERFACE_MODE_PSGMII is missing from phylink_get_inband_type(), so phylink reports INBAND_NONE for it and phylink_pcs_neg_mode() falls back to PHYLINK_PCS_NEG_NONE. The PCS is then programmed in force mode and its control-register speed bits (which default to 1000base) are used, so a slower copper link - e.g. 100base-T - is reported as 1Gbps and cannot pass traffic. Classify PSGMII alongside SGMII and QSGMII as INBAND_CISCO_SGMII so the PCS negotiates in-band and the resolved link speed comes from the PHY in-band word. Also add PSGMII to the generic clause 22 PCS helper functions which handle the SGMII in-band word. Without this, a PCS using these helpers would still fall through to the default handling and force the link state to false in phylink_mii_c22_pcs_decode_state(), fail to encode the SGMII advertisement, and get rejected by phylink_get_link_timer_ns(). Signed-off-by: Sandeep Sondagar <sandeepsondagar@gmail.com> Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de> Link: https://patch.msgid.link/20260809-phylink-psgmii-v3-1-908dcd3a9e3d@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-14Merge 7.2-rc7 into usb-nextGreg Kroah-Hartman110-573/+1374
We need the USB fixes in here as well to build on top of. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-08-13net: stmmac: intel: Add missing pci_free_irq_vectors() callsFlorian Bezdeka1-0/+2
The IRQ vectors allocated in stmmac_config_multi_msi() or stmmac_config_single_msi() where never explicitly cleaned up. As pcim_enable_device() is used, all sorts of other functions are switched to managed mode. The missing cleanup here isn't actually missing, it's buried in the depths of PCI code. But: There are some ongoing activities to remove that cleanup magic. See the linked discussions below. This patch prepares the dwmac-intel code for the removal. Link: https://lore.kernel.org/netdev/27fec7d0ed633218a7787be3edce63c3038c63e2.camel@mailbox.org/ Link: https://lore.kernel.org/netdev/7e024db2557a4d5822a0dd409ae678d10d815d9c.camel@mailbox.org/ Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com> Link: https://patch.msgid.link/20260810-flo-net-stmmac-default-affinity-core-v2-1-d2105780b8ca@siemens.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-13netdevsim: drop the ability to change max_vfs via debugfsSlawomir Stepien3-82/+3
This debugfs file isn't used by kernel's selftests, so drop it. Reported-by: syzbot+3147c5de186107ffc7a1@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=3147c5de186107ffc7a1 Suggested-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Slawomir Stepien <sst@poczta.fm> Link: https://patch.msgid.link/20260810085717.570382-1-sst@poczta.fm Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-13net: tun: bound receive headroomAsim Viladi Oglu Manizada1-5/+16
tun_get_user() uses tun->align both as skb headroom and when choosing how much packet data to keep linear. OVS can propagate an oversized headroom request from another port to TUN or TAP. When align is larger than the usable space in a one-page skb head, SKB_MAX_HEAD(align) underflows and the result becomes negative when stored in good_linear. That value later wraps when assigned to the size_t linear variable, and tun_alloc_skb() can place skb->data outside the allocated head. Bound the headroom stored by TUN to the one-page skb-head budget and the largest non-sentinel 16-bit skb header offset. Leave one linear byte for raw TUN and a complete Ethernet header for TAP, including NET_IP_ALIGN. Also pull the raw-TUN protocol byte and the TAP Ethernet header before accessing them, so these checks remain safe for nonlinear skbs supplied by other allocation paths. Fixes: eaea34b23c46 ("net/tun: implement ndo_set_rx_headroom") Cc: stable@vger.kernel.org Signed-off-by: Asim Viladi Oglu Manizada <manizada@pm.me> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20260812012139.2134643-1-manizada@pm.me Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-13net: phy: dp83640: fix per-bus clock lifetimeXuanqiang Luo1-85/+27
Commit 42e2a9e11a1d ("net: phy: dp83640: improve phydev and driver removal handling") moved per-bus clock cleanup from module exit to the remove path. This leaves two lifetime problems. dp83640_clock_get_bus() publishes a newly allocated clock before the driver allocates its per-PHY data and registers the PTP clock. If either operation fails, no PHY is bound and the remove callback cannot release the clock, leaking the clock and the MII bus device reference. The remove path can also free a clock after dropping clock_lock. A concurrent probe may already have found the clock under phyter_clocks_lock and be waiting for clock_lock, allowing it to acquire a freed mutex and access the freed clock. Use the PHY package infrastructure for the per-bus clock. PHY packages are tracked per MII bus, and the driver uses BROADCAST_ADDR as the package key so the DP83640 PHYs on the same bus share the same clock storage. Call phy_package_join() during probe and phy_package_leave() on probe errors and in remove. Serialize the one-time clock initialization with the package lock because phy_package_probe_once() elects an initializer but does not wait for initialization to finish. Cc: stable+noautosel@kernel.org # untested fix to a driver init path Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn> Link: https://patch.msgid.link/20260811151345.73582-5-xuanqiang.luo@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-13net: phy: dp83640: clear state after PTP registration failureXuanqiang Luo1-0/+4
dp83640_probe() publishes its per-PHY state through phydev before registering the PTP clock. If registration fails, the private data is freed while phydev->mii_ts and phydev->priv still point to it, and default_timestamp remains set. Clear the published PHY state and reset the PTP clock pointer before freeing the private data. Cc: stable+noautosel@kernel.org # untested fix to a driver init path Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn> Link: https://patch.msgid.link/20260811151345.73582-4-xuanqiang.luo@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-13net: phy: dp83640: embed pin configuration in clockXuanqiang Luo1-11/+4
The DP83640 has a fixed number of PTP pins, and its pin configuration has the same lifetime as the per-bus clock. Allocating the configuration separately adds an allocation failure path and requires a separate free. Embed the pin configuration in struct dp83640_clock and point the PTP clock information at the embedded array. This changes only the storage; the pin functions remain configurable at runtime. It also allows all per-bus clock storage to be managed as one allocation. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn> Link: https://patch.msgid.link/20260811151345.73582-3-xuanqiang.luo@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-13net: phy: add PHY package locking helpersXuanqiang Luo2-0/+25
The PHY package API provides private data shared by all PHYs in a package. Drivers are responsible for synchronizing access to this data, but the API does not provide a lock for that purpose. Add phy_package_lock() and phy_package_unlock() for drivers to serialize access to package-private data, including its initialization. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn> Link: https://patch.msgid.link/20260811151345.73582-2-xuanqiang.luo@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-13Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netJakub Kicinski23-102/+206
Cross-merge networking fixes after downstream PR (net-7.2-rc8). No conflicts. Adjacent changes: drivers/net/ethernet/wangxun/ngbe/ngbe_main.c 5f3a13e0bb5e ("net: ngbe: fix NULL pointer dereference in non-MSI-X interrupt enabling") d661abdc30c2 ("net: ngbe: correct misleading interrupt comment") drivers/net/ipvlan/ipvlan_main.c e16e960d55a4 ("ipvlan: inherit needed_headroom and needed_tailroom from phy_dev") 00a40d809207 ("ipvlan: Support per-netns netdev unregistration.") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-13Revert "wifi: mt76: Disable napi when removing device"Mikhail Gavrilov1-4/+1
This reverts commit 13b7e6a96a005c656d38f3da51581deaf9866375. That commit made mt76_dma_cleanup() disable every RX NAPI instance before deleting it, to silence WARNs in __netif_napi_del_locked() and page_pool_disable_direct_recycling() seen when unloading mt7915e with an MT7916. On mt7921e and mt7925e the same instances are already disabled earlier, in mt7921e_unregister_device() and mt7925e_unregister_device(), which only afterwards call mt792x_dma_cleanup() -> mt76_dma_cleanup(). Each instance is therefore disabled twice, and napi_disable() is not idempotent: on return it leaves NAPIF_STATE_SCHED and NAPIF_STATE_NPSVC set, so the second call spins in usleep_range() forever, waiting for bits that nobody will clear. mt7921_pci_shutdown() and mt7925_pci_shutdown() reuse the remove path, so this is hit on every reboot, poweroff and module unload. It is silent: the stuck task keeps sleeping and rescheduling, so neither the hung task detector nor the lockup detectors fire, and the last line on the console is "systemd-shutdown[1]: Rebooting." task:modprobe state:D stack:25720 pid:7954 tgid:7954 Call Trace: <TASK> __schedule+0x11b8/0x26d0 schedule+0xe7/0x2f0 schedule_hrtimeout_range_clock+0x218/0x330 usleep_range_state+0x133/0x1b0 napi_disable_locked+0x37d/0x5f0 napi_disable+0x43/0x80 mt76_dma_cleanup+0x2b4/0x860 [mt76] mt7921_pci_remove+0x17f/0x350 [mt7921e] pci_device_remove+0xb6/0x1e0 device_release_driver_internal+0x38d/0x540 driver_detach+0xd0/0x1b0 bus_remove_driver+0x127/0x2d0 pci_unregister_driver+0x2a/0x280 __do_sys_delete_module+0x36a/0x5b0 do_syscall_64+0x11c/0x6d0 entry_SYSCALL_64_after_hwframe+0x76/0x7e </TASK> Dropping the two driver-side loops instead was tried and rejected: with them gone, the RX poll can reach mt76_token_release() via PKT_TYPE_TXRX_NOTIFY and mt7921_mac_tx_free() while mt76_connac2_tx_token_put() is running idr_destroy(&dev->token) outside token_lock, which is a use-after-free rather than a hang [1]. Revert for now, so that reboot, poweroff and module unload work again. The WARNs on mt7915e are a less severe problem than an unbootable machine, and fixing them belongs in the drivers that delete the NAPI instances, where each one can pick a point that is safe for its own teardown order, rather than in the shared mt76_dma_cleanup(). [ This is the "landing soonish" known regression fix mentioned in the previous networking merge commit - Linus ] Reported-by: Bert Karwatzki <spasswolf@web.de> Closes: https://lore.kernel.org/all/20260724151419.26014-1-spasswolf@web.de/ Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221818 Link: https://lore.kernel.org/all/20260730050428.GA73812@sol/ [1] Signed-off-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com> Acked-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> Fixes: 13b7e6a96a00 ("wifi: mt76: Disable napi when removing device") Tested-by: Devin Wittmayer <lucid_duck@justthetip.ca> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-08-13netconsole: publish the userdata payload with RCUBreno Leitao1-36/+56
update_userdata() takes target_list_lock to swap nt->userdata and nt->userdata_length, then frees the old buffer. Since commit 7eab73b18630 ("netconsole: convert to NBCON console infrastructure") that lock is also the console's device_lock, so writing a userdata value from configfs serialises against the printk core emitting messages. The buffer is immutable once published, which is what RCU is for. Move the string and its length into a single netcons_userdata object and publish it with rcu_replace_pointer(), freeing the old one with kfree_rcu(). New userdata design: 0) Unify the userdata fields into a struct netcons_userdata 1) update_userdata() no longer needs target_list_lock. 2) writers stay serialised by dynamic_netconsole_mutex. 3) reading userdata needs an RCU read lock. No functional change intended. Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Gustavo Luiz Duarte <gustavold@gmail.com> Link: https://patch.msgid.link/20260810-netcons-userdata-rcu-v3-1-f65557f769ce@debian.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-08-13net: mana: Fall back to scattered pages for GDMA queuesAditya Garg3-14/+151
Each GDMA queue ring is one dma_alloc_coherent() of the whole ring size. Such high-order allocations fail first under memory fragmentation, so queue setup can fail with memory still free. The hardware does not need the ring physically contiguous: mana_gd_create_dma_region() already maps it as a list of MANA_PAGE_SIZE (4K) device addresses. Only the driver's linear CPU view needs contiguity, and it goes through mana_gd_ring_ptr() and mana_gd_ring_contig_avail(); change both to map offsets onto scattered pages. Add a fallback in mana_gd_alloc_memory(): data-path queues pass allow_scatter=true, so when the contiguous allocation fails the ring is backed by a vector of scattered PAGE_SIZE (order-0) coherent pages, presenting the same DMA page-list layout to the device. The HW channel bootstrap keeps allow_scatter=false, and the debugfs ring dumper reads scattered rings through the same helpers. Signed-off-by: Aditya Garg <gargaditya@linux.microsoft.com> Link: https://patch.msgid.link/20260807210002.1695263-3-gargaditya@linux.microsoft.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-08-13net: mana: Route ring-buffer access through offset-based helpersAditya Garg1-24/+39
In preparation for backing GDMA queue memory with a vector of non-contiguous order-0 coherent pages, route CPU access to a queue's ring buffer through two new helpers: mana_gd_ring_ptr() returns the CPU address of a byte offset into the ring, and mana_gd_ring_contig_avail() the number of bytes left before the ring wraps, so a WQ write that runs past the end of the ring can be split at that point. Convert the EQ, CQ and work-request paths to use them. mana_gd_write_sgl() now takes a byte offset rather than a raw pointer, so mana_gd_post_work_request() derives the SGL position arithmetically. While queue memory is contiguous both helpers are simple arithmetic on the ring base and size, so there is no functional change. Signed-off-by: Aditya Garg <gargaditya@linux.microsoft.com> Link: https://patch.msgid.link/20260807210002.1695263-2-gargaditya@linux.microsoft.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-08-13net/mlx5: rsc_dump and hv_vhca return NULL on create errorMichael Guralnik4-22/+19
All callers of these create functions treat NULL and ERR_PTR as equivalent error cases. Align the return convention to NULL-on-failure to simplify the checks at usage sites. Since its return value is never checked and failure is non-fatal, change hv_vhca init function to return void. Signed-off-by: Michael Guralnik <michaelgur@nvidia.com> Reviewed-by: Shay Drori <shayd@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260811061637.3195320-1-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-08-12Merge tag 'ovpn-net-20260809' of https://github.com/OpenVPN/ovpn-net-nextJakub Kicinski9-37/+63
Antonio Quartulli says: ==================== Included fixes: * release key slot crypto transforms from a workqueue rather than an RCU callback, because crypto_free_aead() may sleep with async or hardware implementations * run all deferred ovpn work on a module-owned workqueue and drain it on module exit, so no work item can still be executing module text after the module is unloaded * finish crypto callback cleanup (key slot release and leftover skb) before dropping the peer reference that gates netdev unregistration and module removal * avoid dereferencing a NULL key slot when userspace asks to kill a key that is not installed on the peer * tag 'ovpn-net-20260809' of https://github.com/OpenVPN/ovpn-net-next: ovpn: defer key slot crypto freeing to workqueue ovpn: run deferred work on a module-owned workqueue ovpn: finish crypto callback cleanup before peer release ovpn: fix NULL dereference when killing missing key ==================== Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260809212142.2249027-1-antonio@openvpn.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-12r8169: give RTL_GIGA_MAC_VER_EXTENDED a distinct valueKarl Mehltretter1-1/+1
RTL_GIGA_MAC_VER_EXTENDED implicitly follows RTL_GIGA_MAC_VER_LAST = RTL_GIGA_MAC_NONE - 1, so it has the same value as RTL_GIGA_MAC_NONE. rtl_init_one() therefore sends unknown chips through extended detection. If TX_CONFIG_V2 reads as zero, they are misidentified as RTL9151AS instead of being rejected. Give RTL_GIGA_MAC_VER_EXTENDED a distinct value. It is only a detection marker and is never stored in tp->mac_version. Found by Clang's -Wduplicate-enum and verified with a QEMU stub. Cc: stable+noautosel@kernel.org # untested fix to unlikely driver error path Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Link: https://patch.msgid.link/20260808101941.57666-1-kmehltretter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-12net: ethernet: ti: am65-cpsw-nuss: Fix port_id extraction from SRC TAGSiddharth Vadapalli1-0/+2
On the packet reception path, the ID of the MAC Port on which the packet was received, is embedded in the RX DMA Descriptor's metadata. The ID is extracted using the helper function cppi5_desc_get_tags_ids() which fills in the 16-bit Source Tag into the 'port_id' variable. However, it is only the lower 8-bits of the 16-bit Source Tag that represent the MAC Port ID, while the upper 8-bits are Hardware-Reserved and carry an arbitrary value. With the existing logic, sporadic kernel crash is observed due to the subsequent driver code accessing out-of-bound memory because of an invalid port_id. Hence, fix the port_id extraction logic to use only the lower 8-bits of the Source Tag as the MAC Port ID. Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver") Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Reviewed-by: Chintan Vankar <c-vankar@ti.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260807111738.2055900-1-s-vadapalli@ti.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-12pptp: drop packets received before connectQingfang Deng1-6/+2
pptp_bind() publishes the socket by its local call ID before it is connected, so GRE packets can reach pptp_rcv_core() while PPPOX_CONNECTED is clear. Such packets are queued on sk_receive_queue, but PPTP provides no recvmsg operation and never drains the queue after connect. The packets therefore remain there until socket destruction. Drop such packets immediately instead. Since PPTP no longer queues packets on sk_receive_queue, remove the corresponding destructor purge. Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev> Link: https://patch.msgid.link/20260811074948.345834-1-qingfang.deng@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-12ppp: annotate lockless queue empty checkQingfang Deng1-1/+1
ppp_poll() checks whether pf->rq contains a packet without holding the queue lock. skb_peek() requires appropriate locking or a private queue, neither of which applies because ppp_input() can enqueue concurrently. Only queue emptiness is needed, so use skb_queue_empty_lockless() instead. Cc: stable+noautosel@kernel.org # race annotation Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev> Reviewed-by: Breno Leitao <leitao@debian.org. Link: https://patch.msgid.link/20260811060236.322284-1-qingfang.deng@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>