summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-10-15rxrpc: Fix update of call->tx_pending without holding lockDavid Howells
Currently, rxrpc_send_data() updates call->tx_pending just before it returns - but it won't be holding the call->user_mutex when it does this if a wait was interrupted by a signal. This would allow a parallel sendmsg() to race. Further, both the callers of rxrpc_send_data() call it with the lock held, and then it returns an indication through the parameter list to say whether it has dropped the lock or not - after which the callers both just drop the lock if it's still held. Fix this by: (1) Moving the release of call->user_mutex down into rxrpc_send_data() and get rid of the indicator parameter. This makes it easier to see where the lock is held. (2) After waiting, if the attempt to reacquire the mutex is interrupted, just return directly there rather than going to out_unlock (3) Restricting the txb variable to inside the buffering loop and leaving ->tx_pending set until we've queued the buffer. Note that there's a slight change in behaviour in that wait_for_space failure now doesn't check for completion because it doesn't hold the call user_mutex. The caller, however, should re-issue the send and pick up any error at a second attempt. Fixes: b0f571ecd794 ("rxrpc: Fix locking in rxrpc's sendmsg") Closes: https://sashiko.dev/#/patchset/20260702144919.172295-1-dhowells%40redhat.com Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: Eric Dumazet <edumazet@google.com> cc: "David S. Miller" <davem@davemloft.net> cc: Jakub Kicinski <kuba@kernel.org> cc: Paolo Abeni <pabeni@redhat.com> cc: Simon Horman <horms@kernel.org> cc: linux-afs@lists.infradead.org cc: stable@vger.kernel.org Link: https://patch.msgid.link/20261006133011.531806-4-dhowells@redhat.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15rxrpc: Fix rxperf test rxgk key kvno to be 0David Howells
Fix the test rxgk keys in the rxperf test server to have kvno 0 to match other implementations. Fixes: aa2199088a39 ("rxrpc: rxperf: Add test RxGK server keys") Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: Jeffrey Altman <jaltman@auristor.com> cc: Eric Dumazet <edumazet@google.com> cc: "David S. Miller" <davem@davemloft.net> cc: Jakub Kicinski <kuba@kernel.org> cc: Paolo Abeni <pabeni@redhat.com> cc: Simon Horman <horms@kernel.org> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20261006133011.531806-3-dhowells@redhat.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15rxrpc: Revert "rxrpc: rxperf: Fix missing decoding of terminal magic cookie"David Howells
Revert commit c34d999ca3145d9fe858258cc3342ec493f47d2e: The rxperf RPCs seem to have a magic cookie at the end of the request that was failing to be taken account of by the unmarshalling of the request. Fix the rxperf code to expect this. Actually, this isn't true; it's just that other Rx implementations ignore the extra data in the request and so my test programs are sending too much data without noticeable consequence. Fixes: c34d999ca314 ("rxrpc: rxperf: Fix missing decoding of terminal magic cookie") Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: Eric Dumazet <edumazet@google.com> cc: "David S. Miller" <davem@davemloft.net> cc: Jakub Kicinski <kuba@kernel.org> cc: Paolo Abeni <pabeni@redhat.com> cc: Simon Horman <horms@kernel.org> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20261006133011.531806-2-dhowells@redhat.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15hwrng: amd - use PMBASE_OFFSET consistentlyThorsten Blum
Use PMBASE_OFFSET instead of the hard-coded 0xF0 and add the missing space to the ioport_map() error message. Signed-off-by: Thorsten Blum <blum@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-10-15hwrng: cctrng - simplify cctrng_probe()Thorsten Blum
Handle the error directly and drop the goto statement. Signed-off-by: Thorsten Blum <blum@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-10-15hwrng: intel - simplify intel_rng_mod_init()Thorsten Blum
Return errors directly to simplify intel_rng_mod_init(). Signed-off-by: Thorsten Blum <blum@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-10-15crypto: qat - fix use of destroyed vf2pf_lock on VF restartAhsan Atta
adf_dev_stop_async() sends the RESTARTING_COMPLETE message after adf_dev_down() has returned, but adf_dev_down() already destroyed the lock that message takes. Both run in sequence in the same worker, so every PF restart locks a destroyed mutex. With CONFIG_DEBUG_MUTEXES on a dh895xcc with 32 host-bound VFs this trips on the first PF reset: DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: kernel/locking/mutex.c:159 at mutex_lock+0x171/0x1c0 Workqueue: adf_vf_stop_wq adf_dev_stop_async [intel_qat] Call Trace: adf_gen2_pfvf_send+0x210/0x530 [intel_qat] adf_vf2pf_notify_restart_complete+0x55/0x80 [intel_qat] adf_dev_stop_async+0xdb/0x140 [intel_qat] The notification cannot move before adf_dev_down(): the PF waits for it before its own reset and the VF must tear down its rings first. vf2pf_lock protects the VF2PF CSR and is unrelated to the PF2VF bottom half it is initialised alongside. Tie its lifetime to the accel device, next to state_lock in adf_devmgr_add_dev()/adf_devmgr_rm_dev(), so it stays valid for messages sent outside the device up/down cycle. It is only touched for VFs, which set is_vf before adf_devmgr_add_dev() and keep it set until adf_devmgr_rm_dev(). Fixes: 6f1b5236348f ("crypto: qat - fix recovery flow for VFs") Cc: stable@vger.kernel.org Signed-off-by: Ahsan Atta <ahsan.atta@intel.com> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-10-15crypto: qat - initialise state_lock on every path in adf_devmgr_add_dev()Ahsan Atta
state_lock is initialised at the end of adf_devmgr_add_dev(), but the VF on host path whose id mapping already exists returns earlier via 'goto unlock'. That mapping outlives the VF, so this path is taken every time a VF is recreated on a BDF that already hosted one, e.g.: echo 0 > sriov_numvfs echo 32 > sriov_numvfs accel_dev is freshly allocated on each probe, so state_lock is left zeroed and adf_dev_up() takes an uninitialised mutex. With CONFIG_DEBUG_MUTEXES this is reported on a dh895xcc with 32 host-bound VFs: DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: kernel/locking/mutex.c:159 at mutex_lock+0x171/0x1c0 Call Trace: adf_dev_up+0x27/0xe0 [intel_qat] adf_probe+0x700/0xa80 [qat_dh895xccvf] local_pci_probe+0xd5/0x190 The same happens on teardown when adf_dev_down() locks it again. Initialise the lock next to the other per-device state, before the tables are updated, so it is done on every path. Fixes: 1bdc85550a2b ("crypto: qat - fix concurrency issue when device state changes") Cc: stable@vger.kernel.org Signed-off-by: Ahsan Atta <ahsan.atta@intel.com> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-10-15hwrng: imx-rngc - Use optional clockJean-Michel Hautbois
Change devm_clk_get() to devm_clk_get_optional() to support platforms where the RNG clock is always enabled and not exposed via the clock framework (such as ColdFire MCF54418). Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org> Reviewed-by: Martin Kaiser <martin@kaiser.cx> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-10-15USB: serial: mxuport: support RS485 mode configurationCrescent Hsieh
Add support for TIOCSRS485 and TIOCGRS485 so that userspace can configure the serial interface mode using struct serial_rs485. Map the serial_rs485 flags to the device interface modes as follows: - RS232 = no flags set - RS422 = SER_RS485_ENABLED | SER_RS485_MODE_RS422 - RS485_2W (half-duplex) = SER_RS485_ENABLED - RS485_4W (full-duplex) = SER_RS485_ENABLED | SER_RS485_RX_DURING_TX Unsupported flags and fields are cleared before applying the configuration. Cache the sanitized per-port configuration and serialize access with the per-port mutex. Signed-off-by: Crescent Hsieh <crescentcy.hsieh@moxa.com> Signed-off-by: Johan Hovold <johan@kernel.org>
2026-10-15USB: serial: mxuport: handle SEND_NEXT transmit flow controlCrescent Hsieh
The device uses a per-port SEND_NEXT request and event to pace host-to-device transmission. During burn-in testing, sustained writes without waiting for this event resulted in per-port buffer overflows and data errors. The issue can be reproduced on existing G1 devices as well. The driver initiates the protocol by setting the SEND_NEXT bit in a bulk-out header and then stops submitting data for that port. The firmware reports a SEND_NEXT event when the corresponding per-port buffer is empty, at which point the driver resumes transmission. Track the payload placed in bulk-out transfers for each port and set the request bit when it reaches bulk_out_size. Use the generic write control callbacks to hold further submissions until the event arrives and to roll back the payload count and hold state if usb_submit_urb() fails. Use bulk_out_size as a common threshold for all device families instead of encoding their firmware buffer sizes in the driver. Signed-off-by: Crescent Hsieh <crescentcy.hsieh@moxa.com> Signed-off-by: Johan Hovold <johan@kernel.org>
2026-10-15USB: serial: add generic write control callbacksCrescent Hsieh
Some USB serial devices use device-specific flow control to determine whether write submission may proceed. The generic write path currently provides no way to pause submission based on driver-specific state. It also provides no way for a driver to restore its state if URB submission fails. Add an optional write_ready() callback to struct usb_serial_driver. Call it with port->lock held after confirming that data is queued and a write URB is available. If the callback returns false, stop write processing and leave the data in the FIFO. The driver must call usb_serial_generic_write_start() when writes may proceed again. Add an optional write_rollback() callback for restoring driver-specific state after usb_submit_urb() fails. Call it with port->lock held after restoring the generic transmit accounting, and pass it the length of the prepared transfer. Drivers which do not provide these callbacks retain the existing generic write behaviour. Signed-off-by: Crescent Hsieh <crescentcy.hsieh@moxa.com> Signed-off-by: Johan Hovold <johan@kernel.org>
2026-10-15IB/IPoIB: Cancel normal flush work on device stopCarolina Jubran
ipoib_ib_dev_flush_normal() can race with ipoib_stop() because the normal flush work does not run under RTNL. Before commit a77a57a1a22a ("IPoIB: Fix deadlock on RTNL in ipoib_stop()"), ipoib_stop() flushed ipoib_workqueue after clearing IPOIB_FLAG_ADMIN_UP and before calling ipoib_ib_dev_down(). This ensured that any in-flight flush work completed before ipoib_ib_dev_down() performed the final clear of IPOIB_FLAG_OPER_UP. After that commit removed the workqueue flush to avoid a deadlock with workqueue tasks taking RTNL, a normal flush can continue running concurrently with ipoib_stop() after IPOIB_FLAG_ADMIN_UP has been cleared. The flush may observe IPOIB_FLAG_ADMIN_UP set and continue running while ipoib_stop() clears IPOIB_FLAG_ADMIN_UP and brings the device down. The flush can then call ipoib_ib_dev_up() and set IPOIB_FLAG_OPER_UP again after the device has already been stopped: flush_normal (ipoib_workqueue) ipoib_stop() (RTNL held) ------------------------------ ------------------------ test_bit(ADMIN_UP) == 1 clear_bit(ADMIN_UP) ipoib_ib_dev_down() clear_bit(OPER_UP) ipoib_ib_dev_up() set_bit(OPER_UP) This leaves the interface with ADMIN_UP clear and OPER_UP set. During device removal, ipoib_ndo_uninit() waits in destroy_workqueue() while holding RTNL, while ipoib_mcast_carrier_on_task() may keep retrying rtnl_trylock() as long as OPER_UP remains set, resulting in a deadlock. Cancel the normal flush work from ipoib_stop() after clearing IPOIB_FLAG_ADMIN_UP and before bringing the device down. A pending normal flush is canceled, while an already running flush is allowed to finish before ipoib_ib_dev_down() performs the final transition to OPER_UP clear. Only the normal flush needs this synchronization. The heavy flush is already serialized with ipoib_stop() by RTNL, while the light flush does not bring the device back up and therefore cannot recreate this race. Fixes: a77a57a1a22a ("IPoIB: Fix deadlock on RTNL in ipoib_stop()") Reported-by: John Popplewell <john.popplewell@nmc2.ai> Signed-off-by: Carolina Jubran <cjubran@nvidia.com> Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com> Signed-off-by: Edward Srouji <edwards@nvidia.com> Link: https://patch.msgid.link/20261014-ipoib-cancel-work-v1-1-6c0faac016b8@nvidia.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
2026-10-15USB: serial: mxuport: add MUX50U-based device supportCrescent Hsieh
Add support for MUX50U-based UPort G2 devices and Platform UARTs. Add their product IDs and list the supported products by family. Encode the number of ports and device family in each USB device ID entry. Use the family to select the firmware image and version offsets, and the method used to determine whether a firmware download is needed. UPort G2 devices use the shared UP firmware image (moxa-up-mux50u.fw), while Platform UARTs use the shared PF firmware image (moxa-pf-mux50u.fw). Platform UARTs are board-level UARTs accessed through the USB bus. The factory firmware on MUX50U-based devices reports its version in a different format from the runtime firmware image, so version comparison cannot reliably determine whether a firmware download is needed. Check the system-register remap state instead to determine whether the device is already running the runtime firmware from SRAM. Keep the existing per-product firmware selection and version comparison for UPort G1 devices. Signed-off-by: Crescent Hsieh <crescentcy.hsieh@moxa.com> Signed-off-by: Johan Hovold <johan@kernel.org>
2026-10-15USB: serial: mxuport: clean up firmware version handlingCrescent Hsieh
Add a small helper for parsing firmware versions and use it for the firmware image. This avoids open-coded firmware image offsets in probe() and retains the existing image-size validation before reading the version bytes. Keep the existing version comparison policy unchanged, but store the version components explicitly so that the version can be printed without unpacking a raw integer. Print the firmware version fields in decimal, as these fields represent readable version components rather than hexadecimal values. Signed-off-by: Crescent Hsieh <crescentcy.hsieh@moxa.com> Signed-off-by: Johan Hovold <johan@kernel.org>
2026-10-15USB: serial: mxuport: clean up product ID definitions and device tableCrescent Hsieh
Rename the product ID definitions after the corresponding product names to make the product mapping explicit. Introduce a helper macro to keep each device-table entry on one line and make the table easier to scan. Signed-off-by: Crescent Hsieh <crescentcy.hsieh@moxa.com> Signed-off-by: Johan Hovold <johan@kernel.org>
2026-10-15Merge branch 'net-move-setting-of-netops-to-fix-crash'Paolo Abeni
David Yang says: ==================== net: Move setting of netops to fix crash Commit ded86da4bbb7 ("net: ethtool: relax ethnl_req_get_phydev() locking assertion") put a netdev_need_ops_lock() check on the phy_attach_direct() path, in phy_link_topo_add_phy(). With CONFIG_NET_SHAPER enabled netdev_need_ops_lock() reads dev->netdev_ops->net_shaper_ops, so any driver that connects a PHY before assigning ndev->netdev_ops now dies with a NULL pointer dereference at probe time. The breakage showed up in v7.3-rc1. ibm/emac was hit first and fixed by commit 7c9f391ec89c ("net: emac: move setting of netops to fix crash"). These ten patches apply the same one-line move to the remaining in-tree drivers whose probe path attaches a PHY before filling in netdev_ops: 1. hisilicon/hisi_femac (crash reproduced on hardware) 2. hisilicon/hip04 3. actions/owl-emac 4. adi/adin1140 5. marvell/mv643xx_eth 6. amd/au1000_eth 7. ethoc 8. aeroflex/greth 9. ti/icssm-prueth 10. microchip/lan865x (attach happens inside oa_tc6_init()) Only patch 1 was reproduced and verified on hardware; patches 2-10 were found by source inspection and are neither build nor boot tested. Note that ti/netcp_ethss and cavium/thunder_bgx attach a PHY to netdevs that never get a netdev_ops at all (dummy netdevs), so they cannot be fixed by reordering and are not addressed here. ==================== Link: https://patch.msgid.link/20261008022656.3592191-1-mmyangfl@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15microchip: lan865x: move setting of netops to fix crashDavid Yang
lan865x_probe() assigns netdev_ops only after oa_tc6_init(), which connects the internal MAC-PHY through phy_connect_direct(). phy_attach_direct() -> phy_link_topo_add_phy() reads dev->netdev_ops through netdev_need_ops_lock() since the commit in question, so probing crashes with a NULL pointer dereference when CONFIG_NET_SHAPER is enabled. Assign netdev_ops before the PHY attach, as was done for emac in commit 7c9f391ec89c ("net: emac: move setting of netops to fix crash"). Fixes: ded86da4bbb7 ("net: ethtool: relax ethnl_req_get_phydev() locking assertion") Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20261008022656.3592191-11-mmyangfl@gmail.com Reviewed-by: Jijie Shao <shaojijie@huawei.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15net: ti: icssm-prueth: Move setting of netops to fix crashDavid Yang
icssm_prueth_netdev_init() calls of_phy_get_and_connect() before ndev->netdev_ops is assigned. phy_attach_direct() -> phy_link_topo_add_phy() reads dev->netdev_ops through netdev_need_ops_lock() since the commit in question, so probing crashes with a NULL pointer dereference when CONFIG_NET_SHAPER is enabled. Assign netdev_ops before the PHY attach, as was done for emac in commit 7c9f391ec89c ("net: emac: move setting of netops to fix crash"). Fixes: ded86da4bbb7 ("net: ethtool: relax ethnl_req_get_phydev() locking assertion") Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20261008022656.3592191-10-mmyangfl@gmail.com Reviewed-by: Jijie Shao <shaojijie@huawei.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15net: ethernet: aeroflex: move setting of netops to fix crashDavid Yang
greth_of_probe() calls greth_mdio_init(), which connects the PHY, before dev->netdev_ops is assigned. phy_attach_direct() -> phy_link_topo_add_phy() reads dev->netdev_ops through netdev_need_ops_lock() since the commit in question, so probing crashes with a NULL pointer dereference when CONFIG_NET_SHAPER is enabled. Assign netdev_ops before the PHY attach, as was done for emac in commit 7c9f391ec89c ("net: emac: move setting of netops to fix crash"). Fixes: ded86da4bbb7 ("net: ethtool: relax ethnl_req_get_phydev() locking assertion") Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Acked-by: Andreas Larsson <andreas@gaisler.com> Link: https://patch.msgid.link/20261008022656.3592191-9-mmyangfl@gmail.com Reviewed-by: Jijie Shao <shaojijie@huawei.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15net: ethoc: move setting of netops to fix crashDavid Yang
ethoc_probe() calls ethoc_mdio_probe(), which connects the PHY, before netdev->netdev_ops is assigned. phy_attach_direct() -> phy_link_topo_add_phy() reads dev->netdev_ops through netdev_need_ops_lock() since the commit in question, so probing crashes with a NULL pointer dereference when CONFIG_NET_SHAPER is enabled. Assign netdev_ops before the PHY attach, as was done for emac in commit 7c9f391ec89c ("net: emac: move setting of netops to fix crash"). Fixes: ded86da4bbb7 ("net: ethtool: relax ethnl_req_get_phydev() locking assertion") Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Daniel Machon <daniel.machon@microchip.com> Link: https://patch.msgid.link/20261008022656.3592191-8-mmyangfl@gmail.com Reviewed-by: Jijie Shao <shaojijie@huawei.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15net: au1000: move setting of netops to fix crashDavid Yang
au1000_probe() calls au1000_mii_probe(), which connects the PHY, before dev->netdev_ops is assigned. phy_attach_direct() -> phy_link_topo_add_phy() reads dev->netdev_ops through netdev_need_ops_lock() since the commit in question, so probing crashes with a NULL pointer dereference when CONFIG_NET_SHAPER is enabled. Assign netdev_ops before the PHY attach, as was done for emac in commit 7c9f391ec89c ("net: emac: move setting of netops to fix crash"). Fixes: ded86da4bbb7 ("net: ethtool: relax ethnl_req_get_phydev() locking assertion") Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20261008022656.3592191-7-mmyangfl@gmail.com Reviewed-by: Jijie Shao <shaojijie@huawei.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15net: mv643xx: move setting of netops to fix crashDavid Yang
mv643xx_eth_probe() connects the PHY before dev->netdev_ops is assigned. phy_attach_direct() -> phy_link_topo_add_phy() reads dev->netdev_ops through netdev_need_ops_lock() since the commit in question, so probing crashes with a NULL pointer dereference when CONFIG_NET_SHAPER is enabled. Assign netdev_ops before the PHY attach, as was done for emac in commit 7c9f391ec89c ("net: emac: move setting of netops to fix crash"). Fixes: ded86da4bbb7 ("net: ethtool: relax ethnl_req_get_phydev() locking assertion") Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Daniel Machon <daniel.machon@microchip.com> Link: https://patch.msgid.link/20261008022656.3592191-6-mmyangfl@gmail.com Reviewed-by: Jijie Shao <shaojijie@huawei.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15net: ethernet: adi: Move setting of netops to fix crashDavid Yang
adin1140_probe() calls adin1140_phy_init(), which connects the PHY, before netdev->netdev_ops is assigned. phy_attach_direct() -> phy_link_topo_add_phy() reads dev->netdev_ops through netdev_need_ops_lock() since the commit in question, so probing crashes with a NULL pointer dereference when CONFIG_NET_SHAPER is enabled. Assign netdev_ops before the PHY attach, as was done for emac in commit 7c9f391ec89c ("net: emac: move setting of netops to fix crash"). Fixes: ded86da4bbb7 ("net: ethtool: relax ethnl_req_get_phydev() locking assertion") Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Ciprian Regus <ciprian.regus@analog.com> Link: https://patch.msgid.link/20261008022656.3592191-5-mmyangfl@gmail.com Reviewed-by: Jijie Shao <shaojijie@huawei.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15net: ethernet: actions: Move setting of netops to fix crashDavid Yang
owl_emac_probe() calls owl_emac_phy_init(), which connects the PHY, before netdev->netdev_ops is assigned. phy_attach_direct() -> phy_link_topo_add_phy() reads dev->netdev_ops through netdev_need_ops_lock() since the commit in question, so probing crashes with a NULL pointer dereference when CONFIG_NET_SHAPER is enabled. Assign netdev_ops before the PHY attach, as was done for emac in commit 7c9f391ec89c ("net: emac: move setting of netops to fix crash"). Fixes: ded86da4bbb7 ("net: ethtool: relax ethnl_req_get_phydev() locking assertion") Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20261008022656.3592191-4-mmyangfl@gmail.com Reviewed-by: Jijie Shao <shaojijie@huawei.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15net: hisilicon: hip04_eth: Move setting of netops to fix crashDavid Yang
hip04_mac_probe() calls of_phy_connect() before ndev->netdev_ops is assigned. phy_attach_direct() -> phy_link_topo_add_phy() reads dev->netdev_ops through netdev_need_ops_lock() since the commit in question, so probing crashes with a NULL pointer dereference when CONFIG_NET_SHAPER is enabled. Assign netdev_ops before the PHY attach, as was done for emac in commit 7c9f391ec89c ("net: emac: move setting of netops to fix crash"). Fixes: ded86da4bbb7 ("net: ethtool: relax ethnl_req_get_phydev() locking assertion") Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20261008022656.3592191-3-mmyangfl@gmail.com Reviewed-by: Jijie Shao <shaojijie@huawei.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15net: hisilicon: hisi_femac: Move setting of netops to fix crashDavid Yang
hisi_femac_drv_probe() connects the PHY before dev->netdev_ops is assigned. phy_attach_direct() -> phy_link_topo_add_phy() reads dev->netdev_ops through netdev_need_ops_lock() since the commit in question, so probing crashes with a NULL pointer dereference when CONFIG_NET_SHAPER is enabled. phy_link_topo_add_phy from phy_attach_direct+0xec/0x37c of_phy_get_and_connect from hisi_femac_drv_probe+0x1f4/0x558 Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b Assign netdev_ops before the PHY attach, as was done for emac in commit 7c9f391ec89c ("net: emac: move setting of netops to fix crash"). Fixes: ded86da4bbb7 ("net: ethtool: relax ethnl_req_get_phydev() locking assertion") Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Jijie Shao <shaojijie@huawei.com> Link: https://patch.msgid.link/20261008022656.3592191-2-mmyangfl@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15Merge branch 'kexec-7.4' into kexec-nextMike Rapoport (Microsoft)
2026-10-15Merge branch 'kexec-fixes' into kexec-nextMike Rapoport (Microsoft)
2026-10-15softirq: Preserve interrupt context on return from interruptKarl Mehltretter
__irq_exit_rcu() removes HARDIRQ_OFFSET from preempt_count() before the interrupt exit work. On the outermost interrupt exit, with no NMI or softirq state remaining, this makes context checks report task context. The softirq-dispatch, timer-wakeup and tick-exit checks account for the early decrement, but other code reached in this window sees the wrong context: - ftrace, perf and the ring buffer record task context and use the task recursion and context slots. - KCSAN attributes accesses to the interrupted task. KMSAN uses and changes the interrupted task's KMSAN context. KCOV and the printk caller id see a task. - On PREEMPT_RT can_spin_trylock() and local_trylock() reject hard interrupt context to avoid interfering with PI when the interrupted task is blocked on a lock. Those checks do not reject calls made in this window. BPF programs attached to sched_waking or sched_wakeup can reach the trylock path through kmalloc_nolock(). - An oops kills the interrupted task instead of ending in "Fatal exception in interrupt". The early decrement predates git. No failure caused by this misclassification is known. lockdep is unaffected because lockdep_hardirq_exit() is the last operation in irq_exit(). Keep HARDIRQ_OFFSET until the end of __irq_exit_rcu(), including tick_irq_exit(). Softirq handlers must run in BH context, so replace HARDIRQ_OFFSET with SOFTIRQ_OFFSET while they run and restore it afterwards. Use one raw counter update for each transition to preserve the preemption disable location recorded by irq_enter_rcu(), and update lockdep explicitly. Detect IRQ exit with in_hardirq() in softirq_handle_begin() because __do_softirq() can be reached through do_softirq_own_stack() and cannot take an argument. Adjust the exit checks for HARDIRQ_OFFSET still being present. Use irq_count() == HARDIRQ_OFFSET for softirq dispatch, as in irq_enter_rcu(). Use hardirq_count() == HARDIRQ_OFFSET for the timer thread wakeup and tick_irq_exit(). NMI exits use a separate path. An IRQ nested in an NMI has an extra HARDIRQ_OFFSET from NMI entry, so it is excluded too. The timer thread check must ignore softirq_count() to allow wakeups when an IRQ interrupts softirq processing or a BH-disabled section. The timer thread handles all pending softirqs, including any raised during its wakeup. A softirq raised from a tracepoint on the final preempt_count_sub() waits for the next interrupt exit and can trigger NOHZ tick-stop warnings. Handling that instrumentation case does not justify a check on every interrupt exit. A tracepoint on tick_irq_exit() can also raise a softirq after the normal softirq handling has finished. The number of counter updates and interrupt time accounting are unchanged. The preemptoff tracer now reports the interrupt and subsequent softirq processing as one section. With nofuncgraph-irqs, function graph tracing also skips the IRQ exit work, including the __do_softirq() frame. Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Assisted-by: LLM Reviewed-by: Bradley Morgan <brads@mainlining.org> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20260813130826.GW687043@noisy.programming.kicks-ass.net Link: https://patch.msgid.link/20261011060742.30584-1-kmehltretter@gmail.com
2026-10-15kho: do not reserve empty per-node bootmem areasPratyush Yadav (Google)
Some nodes do not allocate any early boot memory. An example is hotpluggable nodes with movable_node enabled. So the bootmem size for them ends up being zero. Zero size allocations normally don't play well with memblock. Memblock returns an address, but then doesn't actually reserve anything. This address ends up being recorded in kho_bootmem with a size of 0. In case of hotpluggable nodes with movable_nodes, the allocation on the node actually fails because memblock refuses to allocate there, and so KHO fails to initialize. Skip bootmem reservation for such nodes entirely. To keep the code more robust, avoid overloading kho_bootmem_cnt. use max_nr_bootmem to store the size of kho_bootmem array. This ensures that the location of kho_bootmem_cnt assignment does not affect the cleanup paths. Fixes: 3dc92c311498 ("kexec: add Kexec HandOver (KHO) generation helpers") Reported-by: Bing Jiao <bingjiao@google.com> Signed-off-by: Pratyush Yadav (Google) <pratyush@kernel.org> Link: https://patch.msgid.link/20261014131547.259138-1-pratyush@kernel.org Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
2026-10-15accel/ivpu: Load firmware on cold bootAndrzej Kacprowski
Load the firmware image immediately before each cold boot instead of during probe or cold-boot preparation. This moves image loading to a single call site and aligns code for future driver changes. Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com> Reviewed-by: Karol Wachowski <karol.wachowski@linux.intel.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com> Link: https://patch.msgid.link/20261014101545.3298558-1-andrzej.kacprowski@linux.intel.com
2026-10-15netlink: avoid hashing the network namespace pointerKyle Zeng
The netlink rhashtable key includes a raw struct net pointer and a user-controlled port ID. Both /proc/net/netlink and socket diagnostics expose the table's bucket order. By binding and rebinding chosen NETLINK_USERSOCK port IDs, an unprivileged reader can distinguish equal buckets and recover the low bits of the Jenkins hash. Its 32-bit seed and the limited set of kernel-image slides can then be searched offline to recover the address of init_net. Use the namespace's unique, non-address net_cookie in the comparison key instead. It is assigned before the per-net initializers run and remains unchanged for the namespace's lifetime. The lookup key and object hash are still built by netlink_compare_arg_init(), keeping lookup, insertion, removal and rehashing consistent while preserving namespace separation. Neither public table walker needs to change. Reading the socket's namespace cookie in netlink_compare() is safe under RCU, including during namespace teardown. netlink_release() removes the socket from the hash table and defers its final put with call_rcu(). cleanup_net() runs the per-net exit methods and waits for outstanding RCU callbacks with rcu_barrier() before freeing namespace storage. Unlike ns.ns_id, net_cookie is also available and initialized during setup_net() in older stable kernels, making the change straightforward to backport to v5.15 and later. Fixes: c428ecd1a21f ("netlink: Move namespace into hash key") Assisted-by: LLM Signed-off-by: Kyle Zeng <kylebot@openai.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Eric Dumazet <edumazet@kernel.org> Link: https://patch.msgid.link/20261008011359.63727-2-kylebot@openai.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15veth: clear rx queue hint in veth_xmitJiayuan Chen
With more tx queues on one end of a veth pair than rx queues on the other, and RPS or generic XDP enabled on the receiving end, we get: veth1 received packet on queue 2, but number of RX queues is 2 WARNING: net/core/dev.c:5212 at get_rps_cpu+0x560/0x1360 Call Trace: <TASK> netif_rx_internal+0x1af/0x4c0 __netif_rx+0x99/0x350 veth_xmit+0x713/0xca0 dev_hard_start_xmit+0x166/0x5f0 __dev_queue_xmit+0x1797/0x42d0 ip_finish_output2+0xa34/0x1f40 __ip_finish_output+0x510/0x7e0 ip_finish_output+0x2f/0x320 ip_output+0x17a/0x3f0 ip_send_skb+0x1bc/0x220 ...... Easy to hit with "ethtool -L veth0 tx 4", "ethtool -L veth1 rx 2", rps_cpus set on veth1 and a few flows sent over the pair [1]. veth_xmit() uses skb->queue_mapping to pick the peer rq, but never clears it before veth_forward_skb(), so the rx side still sees the tx queue index. Everything on the rx side that goes through skb_get_rx_queue(), like get_rps_cpu() and netif_get_rxqueue() for generic XDP, takes it as a recorded rx queue and warns once it is out of range. Clear it before handing the skb to the peer: - It is the tx queue index of this device, it says nothing about the rx queue of the peer. - The two sides don't even agree on the encoding. The tx side stores the index as is, the rx side stores index + 1 so that 0 can mean "not recorded". So tx queue k is read back as rx queue k - 1, and tx queue 0 as "not recorded". - Commit 710ad98c363a ("veth: Do not record rx queue hint in veth_xmit") already decided that veth should not pass any queue hint to the peer. There is no tx->rx queue mapping to preserve, so nothing is lost by clearing it. On NETDEV_TX_BUSY the skb goes back to the qdisc, which looks up the txq from skb->queue_mapping to decide when to retry, so restore it there, next to the existing __skb_push(). [1]: https://lore.kernel.org/netdev/156834bb-8e40-496e-9443-9d515fa18eab@linux.dev/ Fixes: 76ff5cc91935 ("rtnl: allow to specify number of rx and tx queues on device creation") Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev> Reviewed-by: Björn Töpel <bjorn@kernel.org> Reviewed-by: Toshiaki Makita <toshiaki.makita1@gmail.com> Reviewed-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com> Link: https://patch.msgid.link/20261009040412.14571-1-jiayuan.chen@linux.dev Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15selftests/bpf: Expect at least one tp_recursion miss in missedQiliang Yuan
missed_tp_recursion attaches its tp programs to bpf_trace_printk and expects each of them to miss exactly one run, the one that its kprobe program on bpf_fentry_test1 triggers by calling bpf_printk(). The test is not serial, so tests running in parallel can add misses to the tp programs while they are attached: - The kprobe on bpf_fentry_test1 is global. Any other test that does bpf_prog_test_run() on a fentry/fexit program calls bpf_fentry_test1() and thereby fires the kprobe program, which calls bpf_printk() from kprobe context and makes the tp programs fail the bpf_prog_active check once more. - Any other program that runs under the bpf_prog_active check, such as a kprobe program or the perf event tracepoint program in legacy_printk, and calls bpf_printk() hits bpf_trace_printk the same way. Either way, test2_recursion_misses comes out as 2 instead of 1. Expect at least one miss, as missed_kprobe_recursion does since commit 08a7078feacf ("selftests/bpf: Improve missed_kprobe_recursion test robustness"). Fixes: 85981e0f9e9f ("selftests/bpf: Add test for recursion counts of perf event link tracepoint") Signed-off-by: Qiliang Yuan <odys.yuan@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20261008-selftests-bpf-missed-tp-recursion-v1-1-0dd60471d655@gmail.com
2026-10-15Merge tag 'loongarch-kvm-7.4' of ↵Paolo Bonzini
git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson into HEAD LoongArch KVM changes for v7.4 1. Add separate vmid support. 2. Simplify MSI interrupt injection. 3. Add crash hypercall support. 4. Allow to set pv_feature until vCPU run. 5. Enable HW page table walk automatically in selftests.
2026-10-15Merge tag 'v7.3-rc5' into irq/coreThomas Gleixner
Get the upstream modifications in softirq.c to avoid conflicts with pending patches,
2026-10-15selftests/bpf: Report a failure to register the session key in test_progsQiliang Yuan
test_progs adds the key that verifies signed programs to the session keyring before it runs any test, and exits when that fails. It exits with 255 without printing anything. pam_keyinit revokes the session keyring on logout, so a test_progs started in the background from an ssh session that has been closed since leaves nothing but an empty log behind, with no hint of what went wrong. Print the error before exiting. Fixes: b720903e2b14 ("selftests/bpf: Enable signature verification for some lskel tests") Signed-off-by: Qiliang Yuan <odys.yuan@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20261008-selftests-bpf-test-progs-session-key-v1-1-ec48e793639b@gmail.com
2026-10-15selftests/bpf: Use its own netns in flow_dissector_skb_less_direct_attachQiliang Yuan
test_flow_dissector_skb_less_direct_attach() and test_flow_dissector_skb_less_indirect_attach() each create a netns to run in, and test_progs may run the two at the same time. Both name their netns flow_dissector_skb_less_indirect_attach_ns. When the two tests overlap, one of them fails to create or open the netns, or loses it to the cleanup of the other one. Name the netns of the direct attach test after that test. Fixes: 2b044dd186f0 ("selftests/bpf: re-split main function into dedicated tests") Signed-off-by: Qiliang Yuan <odys.yuan@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com> Link: https://lore.kernel.org/bpf/20261008-selftests-bpf-flow-dissector-netns-v1-1-5d9889aaad84@gmail.com
2026-10-15MAINTAINERS: drop KY from Hyper-V maintainers listWei Liu
KY has retired from Microsoft. Signed-off-by: Wei Liu <wei.liu@kernel.org>
2026-10-15tools/include: Add Linux-syscall-note to uapi/linux/types.hMarco Vedovati
tools/include/uapi/linux/types.h is the only header under tools/include/uapi/linux/ whose SPDX identifier lacks the Linux-syscall-note exception. The file was originally added as tools/testing/selftests/bpf/include/uapi/linux/types.h by commit 0a5539f66133 ("bpf: Provide a linux/types.h override for bpf selftests.") without any license header. Then commit 579f1d926c66 ("selftests/bpf: fix broken build due to types.h") added type definitions copied from include/uapi/linux/types.h, which is licensed under GPL-2.0 WITH Linux-syscall-note. Commit b24413180f56 ("License cleanup: add SPDX GPL-2.0 license identifier to files with no license") tagged it GPL-2.0, along with other headers under tools/include/uapi/. Those other headers were switched to GPL-2.0 WITH Linux-syscall-note shortly after by commit fb7df12d645c ("tools/headers: Synchronize kernel ABI headers"), when they were synchronized with their kernel counterparts. This file is only a partial copy of include/uapi/linux/types.h, not kept in sync with it, so it kept the GPL-2.0 identifier, also after commit bcd66b10b5e9 ("tools/bpf: Move linux/types.h for selftests and bpftool") moved it to its current location. Use the same identifier as include/uapi/linux/types.h. Signed-off-by: Marco Vedovati <marco.vedovati@crowdstrike.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20261014194516.3030362-1-marco.vedovati@crowdstrike.com
2026-10-15ALSA: hda/realtek: Fix quirk for HP Laptop 15-fc0xxxZhang Heng
The HP Laptop 15-fc0xxx is based on an AMD platform where the digital microphone is provided by the snd-soc-acp6x-mach driver, not by the HDA codec. The ALC236_FIXUP_HP_DMIC quirk configures pin 0x12 as an internal DMIC, which is a misconfiguration for this machine: the pin is not wired to a codec DMIC and the setting has no effect on the actual microphone path (which works via ACP6x). Replace ALC236_FIXUP_HP_DMIC with ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO, the standard quirk used by the closely related HP Laptop 15-fd0xxx and other ALC236 HP machines. This removes the misleading DMIC pin config and adds proper mute LED and micmute LED support that was missing from the original quirk. Fixes: 720460722310 ("ALSA: hda/realtek: add quirk for HP Laptop 15-fc0xxx") Cc: stable@vger.kernel.org Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221233 Closes: https://bugzilla.kernel.org/show_bug.cgi?id=222044 Signed-off-by: Zhang Heng <zhangheng@kylinos.cn> Link: https://patch.msgid.link/20261015065640.377466-1-zhangheng@kylinos.cn Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-10-15ALSA: pcm: Apply sync-stop at SNDRV_PCM_IOCTL_DROP ioctlTakashi Iwai
When a PCM stream is stopped via SNDRV_PCM_IOCTL_DROP ioctl, it calls snd_pcm_stop() but sync-stop operation is missing. Although this is usually no big issue, let's add snd_pcm_sync_stop() call, just to be sure. Link: https://patch.msgid.link/20261014142454.320703-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-10-15ALSA: hda/realtek: Limit Line In boost and ADC gain on DECENTA MATX03wangdicheng
The DECENTA MATX03 (ALC897, SSID 1e0b:1297) exposes a high gain range on both the Line In pin boost and the ADC input amp. Pin 0x1a reports nsteps=0x03 with stepsize=0x27, that is 0, 9.75, 19.5 and 29.25 dB. ADC 0x08 reports nsteps=0x3f with stepsize=0x02, that is 0 to 31.5 dB in 0.5 dB steps, and defaults to 0x3f (maximum). The combined 60.75 dB analogue cascade overloads the front-end when the source level is high, producing audible noise during Line In monitoring. Add a new fixup alc897_fixup_limit_linein_boost that overrides the amp capabilities of pin 0x1a to nsteps=1 (max ~11.75 dB) and ADC 0x08 to nsteps=1 (max ~0.5 dB). The total gain drops from 60.75 dB to ~12.25 dB, eliminating the clipping. Signed-off-by: wangdicheng <wangdicheng@kylinos.cn> Link: https://patch.msgid.link/20261015021210.106392-1-wangdich9700@163.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-10-15ata: libata-core: Fix NO_FUA quirks shadowed by earlier quirk entriesNiklas Cassel
ata_dev_quirks() uses the first entry in __ata_dev_quirks[] that matches the device and ignores all later entries. Commit 38d431229bfb ("ata: libata: exclude FUA support for known buggy drives") appended three ATA_QUIRK_NO_FUA entries to the end of the table, with model patterns meant to cover whole product lines. Earlier entries already match some or all of these drives, so NO_FUA is not always applied: - "INTEL*SSDSC2CT*" never takes effect. Every model it matches also matches the earlier "INTEL*SSD*" entry, so these drives only get ATA_QUIRK_ZERO_AFTER_TRIM. - "WDC*WD2500J*" does not take effect for "WDC WD2500JD-*" drives, which match the earlier ATA_QUIRK_WD_BROKEN_LPM entry. - "OCZ-VERTEX*" does not take effect for "OCZ-VERTEX" drives with firmware "1.30", which match the earlier ATA_QUIRK_BROKEN_HPA entry. Move the Intel entry in front of "INTEL*SSD*" and keep ATA_QUIRK_ZERO_AFTER_TRIM in it, so these drives stay on the ZERO_AFTER_TRIM whitelist. Add ATA_QUIRK_NO_FUA to the WD2500JD and OCZ Vertex 1.30 entries. The quirks of all other drives are unchanged. libata only uses FUA when it is enabled with libata.fua=1, so systems using the default setting are not affected. Fixes: 38d431229bfb ("ata: libata: exclude FUA support for known buggy drives") Assisted-by: LLM Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Link: https://lore.kernel.org/r/20261013193915.174460-2-cassel@kernel.org Signed-off-by: Niklas Cassel <cassel@kernel.org>
2026-10-15net: axienet: free outstanding TX buffers in axienet_dma_bd_release()Sagi Maimon
axienet_dma_bd_release() walks the RX ring to unmap and free every receive buffer before releasing it, but frees the TX descriptor ring with dma_free_coherent() alone. Any descriptor that axienet_free_tx_chain() had not yet reclaimed still holds its skb and its streaming DMA mapping, and both are lost. axienet_stop() disables TX NAPI and stops the DMA engine before calling it, so nothing reclaims those descriptors afterwards. Bringing the interface down while frames are in flight therefore leaks up to lp->tx_bd_num skbs and mappings each time. axienet_dma_err_handler() already walks the TX ring this way before it restarts the DMA engine: it unmaps every descriptor whose cntrl is still set - axienet_free_tx_chain() clears it on reclaim - frees any skb still attached, and clears the descriptor. Move that loop into a helper, axienet_free_tx_bufs(), and call it from axienet_dma_bd_release() too. This relies on axienet_stop() having stopped the DMA engine first, as the RX walk in the same function already does. The helper frees the skbs with dev_kfree_skb_any(), as drops: in the error handler, which runs from a workqueue, that frees them directly rather than deferring them to softirq as dev_kfree_skb_irq() did. The walk must not run on a ring that is not there. axienet_open() does not check the result of the reset that runs axienet_dma_bd_init(), so when that reset fails tx_bd_v is either still NULL or, after an earlier close, points at the ring that close freed. Clear tx_bd_v and rx_bd_v once their rings are freed, and skip the walk when tx_bd_v is NULL. That also ends the second dma_free_coherent() of a stale ring which the same path already did. On the axienet_dma_bd_init() error path the TX ring has just been allocated zeroed, so the walk does nothing. This was reported by the Sashiko AI review bot. Tested on the AXI Ethernet MAC of an ADVA TimeCard X2 (PCIe card, with the built-in AXI DMA): traffic passes, and after each of ten down/up cycles and five module reloads, all made with traffic running and each running axienet_dma_bd_release(), traffic resumes and nothing is logged. The leak itself was not measured, and neither the failed-reset paths nor axienet_dma_err_handler() were exercised. Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver") Reviewed-by: Joe Damato <joe@dama.to> Assisted-by: LLM sparse Signed-off-by: Sagi Maimon <maimon.sagi@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20261007034620.1360542-1-maimon.sagi@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15ata: libahci: re-enable FBS after error handling on a port multiplierKyrylo Biryuk
ahci_do_softreset() disables FBS before resetting a device behind a port multiplier, as required by AHCI 1.2 section 9.3.9, and re-enables it only when that softreset succeeds. If it fails, for example because a hot-plugged drive is still spinning up ("softreset failed (device not ready)"), EH escalates to a hardreset of the PMP link, and nothing turns FBS back on: only ahci_pmp_attach() does, which runs at the next boot. The port keeps working with command-based switching until then. Seen on a Marvell 88SE9235 (1b4b:9235) with Marvell 88SM9705 port multipliers (1b4b:9705, in a Synology DX1222 expansion unit): after hot-plugging a drive, the kernel logged "FBS is disabled" followed by "softreset failed (device not ready)" and a PMP hardreset, and never "FBS is enabled" again (twice, on two different ports). At the end of ahci_error_handler(), re-enable FBS if a PMP is still attached and FBS is supported but disabled. Fixes: 89dafa20f3da ("ahci: disabled FBS prior to issuing software reset") Assisted-by: LLM Signed-off-by: Kyrylo Biryuk <illofspeed@gmail.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Link: https://lore.kernel.org/r/20261012103917.389-1-illofspeed@gmail.com Signed-off-by: Niklas Cassel <cassel@kernel.org>
2026-10-15rust: zerocopy: update to v0.8.62Miguel Ojeda
Update our vendored copy of `zerocopy` (and `zerocopy-derive`) to v0.8.62. This update advances 8 releases, with 3 of them carrying most of the changes. It contains new features as well as fixes [1]. However, almost nothing has changed that requires updates on our side: we only need to move our non-ASCII change to the recently added `project.rs` file, and to add an SPDX license identifier to the also new `invariant.rs` file (I reported it to upstream [2]). The following script may be used to check for the remaining differences: for path in $(cd rust/zerocopy-derive/ && find . -type f ! -name README.md); do curl --silent --show-error --location \ https://github.com/google/zerocopy/raw/v0.8.62/zerocopy/zerocopy-derive/src/$path | git diff --no-index - rust/zerocopy-derive/$path && echo $path: OK done for path in $(cd rust/zerocopy/ && find . -type f ! -name README.md); do curl --silent --show-error --location \ https://github.com/google/zerocopy/raw/v0.8.62/zerocopy/$path | git diff --no-index - rust/zerocopy/$path && echo $path: OK done Comparing the output above with the one for the latest update (v0.8.54) shows no new differences on our side apart from the two mentioned above. Cc: Joshua Liebow-Feeser <joshlf@google.com> Cc: Jack Wrenn <jswrenn@google.com> Link: https://github.com/google/zerocopy/releases [1] Link: https://github.com/google/zerocopy/issues/3858 [2] Assisted-by: LLM Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://patch.msgid.link/20261013184809.35143-2-ojeda@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2026-10-15rust: zerocopy: fix link to upstream `README.md`Miguel Ojeda
Upstream moved the `zerocopy` crate into a `zerocopy/` subdirectory of their repository in v0.8.51 [1]. However, in our v0.8.52 update, the link was not updated. Fix it by adding the subdirectory. Fixes: 2808a3963988 ("rust: zerocopy: update to v0.8.52") Link: https://github.com/google/zerocopy/pull/3434 [1] Assisted-by: LLM Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://patch.msgid.link/20261013184809.35143-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2026-10-15memblock: use binary search to locate candidate regionsTarun Sahu
Use binary search in memblock_add_range() and memblock_isolate_range() to locate candidate regions instead of linearly scanning from index 0. Under heavy memory fragmentation, such as KHO page preservation registering hundreds of thousands of disjoint folios, scanning from index 0 on every insertion and isolation results in O(N^2) complexity, causing boot-time memory retrieval to take several minutes (~268s for 393k pages). Using binary search reduces the candidate search complexity to O(log N) (from O(N)), cutting KHO memory retrieval time from ~268s to ~50ms. memblock_search() open codes the same binary search, so reimplement it on top of the new helper. Signed-off-by: Tarun Sahu <tarunsahu@google.com> Reviewed-by: Pratyush Yadav <pratyush@kernel.org> Link: https://patch.msgid.link/20261008190828.3221718-2-tarunsahu@google.com Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>