mirror-linux/drivers/net/ethernet
Dipayaan Roy 5b05aa36ee net: mana: Skip redundant detach on already-detached port
When mana_per_port_queue_reset_work_handler() runs after a previous
detach succeeded but attach failed, the port is left in a detached
state with apc->tx_qp and apc->rxqs already freed. Calling
mana_detach() again unconditionally leads to NULL pointer dereferences
during queue teardown.

Add an early exit in mana_detach() when the port is already in
detached state (!netif_device_present) for non-close callers, making
it safe to call idempotently. This allows the queue reset handler and
other recovery paths to simply retry mana_attach() without redundant
teardown.

Fixes: 3b194343c2 ("net: mana: Implement ndo_tx_timeout and serialize queue resets per port.")
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Dipayaan Roy <dipayanroy@linux.microsoft.com>
Link: https://patch.msgid.link/20260525081129.1230035-3-dipayanroy@linux.microsoft.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-05-28 16:33:42 -07:00
..
3com ethernet: 3c509: Fix most coding style issues 2026-05-21 08:28:56 -07:00
8390 drivers: net: 8390: wd80x3: Remove this driver 2026-04-23 15:57:10 -07:00
actions
adaptec
adi
aeroflex
agere
airoha net: airoha: Disable GDM2 forwarding before configuring GDM2 loopback 2026-05-21 08:19:54 -07:00
alacritech
allwinner
altera net: altera-tse: fix skb leak on DMA mapping error in tse_start_xmit() 2026-04-02 18:25:23 -07:00
amazon net: ena: PHC: Check return code before setting timestamp output 2026-05-11 17:22:48 -07:00
amd pds_core: ensure null-termination for firmware version strings 2026-05-21 08:21:11 -07:00
apm net: xgene: fix mdio_np leak in xgene_mdiobus_register() 2026-05-10 10:16:58 -07:00
apple
aquantia net: atlantic: preserve PCI wake-from-D3 on shutdown when WOL enabled 2026-05-12 16:41:41 -07:00
arc net: ethernet: arc: emac: quiesce interrupts before requesting IRQ 2026-03-10 19:05:12 -07:00
asix
atheros net: ag71xx: check error for platform_get_irq 2026-05-20 16:50:47 -07:00
broadcom net: bcmgenet: keep RBUF EEE/PM disabled 2026-05-21 08:37:56 -07:00
brocade
cadence net: macb: Use napi_schedule_irqoff() in IRQ handler 2026-04-09 20:17:31 -07:00
calxeda
cavium
chelsio ipv6: convert CONFIG_IPV6 to built-in only and clean up Kconfigs 2026-03-29 11:21:22 -07:00
cirrus net: ethernet: cs89x0: remove stale CONFIG_MACH_MX31ADS reference 2026-05-12 15:28:22 +02:00
cisco enic: detect admin channel resources for SR-IOV 2026-04-02 18:05:06 -07:00
cortina net: ethernet: cortina: Carry over frag counter 2026-05-12 15:20:16 +02:00
davicom
dec
dlink
emulex
engleder
ezchip
faraday net: ftgmac100: fix ring allocation unwind on open failure 2026-03-31 19:38:36 -07:00
freescale net: enetc: avoid VF->PF mailbox timeout during SR-IOV teardown 2026-05-21 08:49:00 -07:00
fungible
google gve: add support for UDP GSO for DQO format 2026-03-09 19:17:52 -07:00
hisilicon net: hibmcge: move dma_rmb() after dma_sync_single_for_cpu() in RX path 2026-05-28 12:59:36 +02:00
huawei hinic3: Fix spelling mistake "capbility" -> "capability" 2026-03-14 08:46:41 -07:00
i825xx
ibm ibmveth: Disable GSO for packets with small MSS 2026-04-27 19:07:57 -07:00
intel igc: fix potential skb leak in igc_fpe_xmit_smd_frame() 2026-05-18 19:00:44 -07:00
litex
marvell octeontx2-af: validate body pcifunc in rvu_mbox_handler_rep_event_notify 2026-05-25 12:49:33 -07:00
mediatek Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-04-14 12:04:00 -07:00
mellanox Including fixes from netfilter. 2026-05-28 13:13:48 -07:00
meta eth: fbnic: fix double-free of PCS on phylink creation failure 2026-05-07 12:34:42 +02:00
micrel net: ks8851: Avoid excess softirq scheduling 2026-04-18 12:14:19 -07:00
microchip net: lan966x: avoid unregistering netdev on register failure 2026-05-08 16:30:45 -07:00
microsoft net: mana: Skip redundant detach on already-detached port 2026-05-28 16:33:42 -07:00
moxa
mscc
mucse
myricom
natsemi
netronome nfp: fix swapped arguments in nfp_encode_basic_qdr() calls 2026-04-23 11:01:20 -07:00
ni
nvidia
nxp
oki-semi
pasemi
pensando Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-03-26 12:09:57 -07:00
qlogic qed: fix double free in qed_cxt_tables_alloc() 2026-05-21 08:15:00 -07:00
qualcomm net: qualcomm: rmnet: fix endpoint use-after-free in rmnet_dellink() 2026-05-18 16:35:52 -07:00
rdc
realtek r8169: add support for RTL8125cp 2026-03-05 13:41:48 +01:00
renesas net: ethernet: ravb: Do not check URAM suspension when WoL is active 2026-05-12 18:46:19 -07:00
rocker net: rocker: kzalloc + kcalloc to kzalloc_flex 2026-03-09 18:51:07 -07:00
samsung
seeq
sfc sfc: fix error code in efx_devlink_info_running_versions() 2026-04-30 13:44:30 +02:00
sgi
silan
sis
smsc drivers: net: smsc: smc91c92: Remove this driver 2026-04-23 15:57:06 -07:00
socionext
spacemit Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-03-12 12:53:34 -07:00
stmicro net: stmmac: eswin: validate RGMII delay values 2026-05-21 11:58:17 +02:00
sun
sunplus
synopsys
tehuti
ti net: ti: icssm-prueth: fix eth_ports_node leak in probe 2026-05-08 18:10:30 -07:00
toshiba
tundra
vertexcom
via
wangxun net: libwx: use request_irq for VF misc interrupt 2026-04-30 18:07:21 -07:00
wiznet
xilinx net: xilinx: axienet: Fix BQL accounting for multi-BD TX packets 2026-03-31 12:09:12 +02:00
xircom
xscale
Kconfig drivers: net: fujitsu: fmvj18x: Remove this driver 2026-04-23 15:57:10 -07:00
Makefile drivers: net: fujitsu: fmvj18x: Remove this driver 2026-04-23 15:57:10 -07:00
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
korina.c
lantiq_etop.c
lantiq_xrx200.c
oa_tc6.c