Jiawen Wu
e159f05e12
net: txgbe: fix RTNL assertion warning when remove module
For the copper NIC with external PHY, the driver called
phylink_connect_phy() during probe and phylink_disconnect_phy() during
remove. It caused an RTNL assertion warning in phylink_disconnect_phy()
upon module remove.
To fix this, add rtnl_lock() and rtnl_unlock() around the
phylink_disconnect_phy() in remove function.
------------[ cut here ]------------
RTNL: assertion failed at drivers/net/phy/phylink.c (2351)
WARNING: drivers/net/phy/phylink.c:2351 at
phylink_disconnect_phy+0xd8/0xf0 [phylink], CPU#0: rmmod/4464
Modules linked in: ...
CPU: 0 UID: 0 PID: 4464 Comm: rmmod Kdump: loaded Not tainted 7.0.0-rc4+
Hardware name: Micro-Star International Co., Ltd. MS-7E16/X670E GAMING
PLUS WIFI (MS-7E16), BIOS 1.90 12/31/2024
RIP: 0010:phylink_disconnect_phy+0xe4/0xf0 [phylink]
Code: 5b 41 5c 41 5d 41 5e 41 5f 5d 31 c0 31 d2 31 f6 31 ff e9 3a 38 8f e7
48 8d 3d 48 87 e2 ff ba 2f 09 00 00 48 c7 c6 c1 22 24 c0 <67> 48 0f b9 3a
e9 34 ff ff ff 66 90 90 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffce7288363ac0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff89654b2a1a00 RCX: 0000000000000000
RDX: 000000000000092f RSI: ffffffffc02422c1 RDI: ffffffffc0239020
RBP: ffffce7288363ae8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8964c4022000
R13: ffff89654fce3028 R14: ffff89654ebb4000 R15: ffffffffc0226348
FS: 0000795e80d93780(0000) GS:ffff896c52857000(0000)
knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005b528b592000 CR3: 0000000170d0f000 CR4: 0000000000f50ef0
PKRU: 55555554
Call Trace:
<TASK>
txgbe_remove_phy+0xbb/0xd0 [txgbe]
txgbe_remove+0x4c/0xb0 [txgbe]
pci_device_remove+0x41/0xb0
device_remove+0x43/0x80
device_release_driver_internal+0x206/0x270
driver_detach+0x4a/0xa0
bus_remove_driver+0x83/0x120
driver_unregister+0x2f/0x60
pci_unregister_driver+0x40/0x90
txgbe_driver_exit+0x10/0x850 [txgbe]
__do_sys_delete_module.isra.0+0x1c3/0x2f0
__x64_sys_delete_module+0x12/0x20
x64_sys_call+0x20c3/0x2390
do_syscall_64+0x11c/0x1500
? srso_alias_return_thunk+0x5/0xfbef5
? do_syscall_64+0x15a/0x1500
? srso_alias_return_thunk+0x5/0xfbef5
? do_fault+0x312/0x580
? srso_alias_return_thunk+0x5/0xfbef5
? __handle_mm_fault+0x9d5/0x1040
? srso_alias_return_thunk+0x5/0xfbef5
? count_memcg_events+0x101/0x1d0
? srso_alias_return_thunk+0x5/0xfbef5
? handle_mm_fault+0x1e8/0x2f0
? srso_alias_return_thunk+0x5/0xfbef5
? do_user_addr_fault+0x2f8/0x820
? srso_alias_return_thunk+0x5/0xfbef5
? irqentry_exit+0xb2/0x600
? srso_alias_return_thunk+0x5/0xfbef5
? exc_page_fault+0x92/0x1c0
entry_SYSCALL_64_after_hwframe+0x76/0x7e
Fixes: 02b2a6f91b ("net: txgbe: support copper NIC with external PHY")
Cc: stable@vger.kernel.org
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/8B47A5872884147D+20260407094041.4646-1-jiawenwu@trustnetic.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-09 20:33:43 -07:00
..
2026-03-27 10:48:30 -06:00
2026-02-21 17:09:51 -08:00
2026-04-05 14:43:47 -07:00
2026-02-21 17:09:51 -08:00
2026-03-31 14:58:56 +02:00
2026-04-07 09:36:46 +02:00
2026-02-22 08:26:33 -08:00
2026-03-27 09:54:31 +01:00
2026-03-27 16:34:25 -07:00
2026-02-21 17:09:51 -08:00
2026-03-21 17:36:33 -07:00
2026-04-01 16:45:47 -04:00
2026-03-17 20:30:57 +01:00
2026-02-06 19:54:40 +00:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-26 14:34:21 -08:00
2026-03-17 20:30:57 +01:00
2026-02-22 08:26:33 -08:00
2026-04-02 14:40:27 +02:00
2026-02-21 20:03:00 -08:00
2026-03-22 15:59:22 +09:00
2026-04-01 16:08:15 +02:00
2026-03-10 16:03:02 +01:00
2026-04-02 17:29:48 -07:00
2026-03-19 15:12:40 -07:00
2026-02-21 17:09:51 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 20:03:00 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-03-17 16:33:32 +05:30
2026-02-21 20:03:00 -08:00
2026-02-26 08:00:13 -08:00
2026-02-22 08:26:33 -08:00
2026-02-21 17:09:51 -08:00
2026-02-22 08:26:33 -08:00
2026-03-16 19:29:45 -07:00
2026-04-06 09:03:19 -07:00
2026-02-21 20:03:00 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-04-02 14:30:40 +02:00
2026-03-30 09:51:15 +02:00
2026-04-05 12:42:25 -07:00
2026-02-21 20:03:00 -08:00
2026-04-08 13:38:30 -07:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-04-04 05:25:53 +00:00
2026-04-01 07:45:57 -07:00
2026-02-10 20:45:30 -08:00
2026-02-21 20:03:00 -08:00
2026-03-27 13:51:21 +01:00
2026-03-11 22:50:29 +01:00
2026-01-07 21:17:43 +01:00
2026-03-29 15:27:12 +02:00
2026-03-27 13:30:04 -07:00
2026-04-04 08:24:32 -07:00
2026-03-14 12:53:13 +02:00
2026-04-09 08:36:31 -07:00
2026-02-21 20:03:00 -08:00
2026-03-31 10:11:29 +02:00
2026-02-21 20:03:00 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 20:03:00 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 17:09:51 -08:00
2026-02-22 08:26:33 -08:00
2026-03-26 13:14:07 +01:00
2026-02-21 17:09:51 -08:00
2026-02-22 08:26:33 -08:00
2026-02-22 08:26:33 -08:00
2026-02-21 20:03:00 -08:00
2026-04-02 14:42:19 +02:00
2026-03-16 16:08:54 +01:00
2026-02-21 17:09:51 -08:00
2026-03-18 18:08:25 +01:00
2026-02-21 17:09:51 -08:00
2026-04-09 20:33:43 -07:00
2026-04-09 13:54:37 +02:00
2026-02-21 11:02:58 -08:00
2026-02-21 17:09:51 -08:00
2026-03-09 09:38:22 -05:00
2026-03-13 10:13:06 -07:00
2026-04-02 16:44:40 +02:00
2026-02-21 17:09:51 -08:00
2026-02-21 20:03:00 -08:00
2026-02-22 08:26:33 -08:00
2026-02-21 17:09:51 -08:00
2026-04-07 10:29:54 -07:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 20:03:00 -08:00
2026-02-27 20:46:57 +05:30
2026-03-23 14:23:09 +01:00
2026-03-31 17:22:28 +03:00
2026-03-20 09:46:15 -07:00
2026-02-21 17:09:51 -08:00
2026-03-04 09:16:41 +01:00
2026-02-22 08:26:33 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-03-10 14:52:42 +00:00
2026-03-05 10:18:23 -07:00
2026-03-13 14:17:30 +00:00
2026-03-23 12:25:47 +01:00
2026-02-21 17:09:51 -08:00
2026-02-22 09:43:11 -08:00
2026-04-03 17:50:24 -07:00
2026-02-21 17:09:51 -08:00
2026-03-27 19:58:22 -07:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-03-17 20:30:57 +01:00
2026-04-01 13:47:03 +02:00
2026-02-22 08:26:33 -08:00
2026-03-30 21:34:53 +01:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-24 10:01:20 -08:00
2026-03-19 22:07:39 -04:00
2026-02-21 17:09:51 -08:00
2026-03-03 09:03:04 +01:00
2026-04-02 11:37:35 +02:00
2026-03-09 12:36:54 +01:00
2026-03-30 17:39:44 +02:00
2026-03-07 11:08:39 -05:00
2026-02-21 17:09:51 -08:00
2026-04-02 13:28:22 +02:00
2026-02-22 08:26:33 -08:00
2026-03-26 06:38:27 -06:00
2026-02-22 08:26:33 -08:00
2026-03-05 17:35:12 +01:00
2026-03-20 21:05:50 -07:00
2026-03-20 11:33:24 +01:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-03-26 08:57:51 +01:00
2026-02-21 17:09:51 -08:00
2026-02-04 20:45:26 +05:30