Commit 325eb21
bnxt_en: bring back rtnl_lock() in the bnxt_open() path
Error recovery, PCIe AER, resume, and TX timeout will invoke bnxt_open()
with netdev_lock only. This will cause RTNL assert failure in
netif_set_real_num_tx_queues(), netif_set_real_num_tx_queues(),
and netif_set_real_num_tx_queues().
Example error recovery assert:
RTNL: assertion failed at net/core/dev.c (3178)
WARNING: CPU: 3 PID: 3392 at net/core/dev.c:3178 netif_set_real_num_tx_queues+0x1fd/0x210
Call Trace:
<TASK>
? __pfx_bnxt_msix+0x10/0x10 [bnxt_en]
__bnxt_open_nic+0x1ef/0xb20 [bnxt_en]
bnxt_open+0xda/0x130 [bnxt_en]
bnxt_fw_reset_task+0x21f/0x780 [bnxt_en]
process_scheduled_works+0x9d/0x400
For now, bring back rtnl_lock() in all these code paths that can invoke
bnxt_open(). In the bnxt_queue_start() error path, we don't have
rtnl_lock held so we just change it to call netif_close() instead of
bnxt_reset_task() for simplicity. This error path is unlikely so it
should be fine.
Fixes: 004b500 ("eth: bnxt: remove most dependencies on RTNL")
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20250514062908.2766677-1-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 92ec485 commit 325eb21
1 file changed
Lines changed: 29 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14013 | 14013 | | |
14014 | 14014 | | |
14015 | 14015 | | |
| 14016 | + | |
| 14017 | + | |
| 14018 | + | |
| 14019 | + | |
| 14020 | + | |
| 14021 | + | |
| 14022 | + | |
| 14023 | + | |
| 14024 | + | |
| 14025 | + | |
| 14026 | + | |
| 14027 | + | |
| 14028 | + | |
| 14029 | + | |
| 14030 | + | |
14016 | 14031 | | |
14017 | 14032 | | |
14018 | 14033 | | |
14019 | | - | |
| 14034 | + | |
14020 | 14035 | | |
14021 | 14036 | | |
14022 | | - | |
| 14037 | + | |
14023 | 14038 | | |
14024 | 14039 | | |
14025 | 14040 | | |
14026 | 14041 | | |
14027 | 14042 | | |
14028 | 14043 | | |
14029 | 14044 | | |
14030 | | - | |
| 14045 | + | |
14031 | 14046 | | |
14032 | | - | |
| 14047 | + | |
14033 | 14048 | | |
14034 | 14049 | | |
14035 | 14050 | | |
| |||
14068 | 14083 | | |
14069 | 14084 | | |
14070 | 14085 | | |
14071 | | - | |
| 14086 | + | |
14072 | 14087 | | |
14073 | 14088 | | |
14074 | 14089 | | |
| |||
14960 | 14975 | | |
14961 | 14976 | | |
14962 | 14977 | | |
14963 | | - | |
| 14978 | + | |
14964 | 14979 | | |
14965 | 14980 | | |
14966 | 14981 | | |
| 14982 | + | |
14967 | 14983 | | |
14968 | 14984 | | |
14969 | 14985 | | |
14970 | 14986 | | |
14971 | 14987 | | |
| 14988 | + | |
14972 | 14989 | | |
14973 | 14990 | | |
14974 | 14991 | | |
| |||
14988 | 15005 | | |
14989 | 15006 | | |
14990 | 15007 | | |
| 15008 | + | |
14991 | 15009 | | |
14992 | 15010 | | |
14993 | 15011 | | |
| |||
15936 | 15954 | | |
15937 | 15955 | | |
15938 | 15956 | | |
15939 | | - | |
| 15957 | + | |
15940 | 15958 | | |
15941 | 15959 | | |
15942 | 15960 | | |
| |||
16752 | 16770 | | |
16753 | 16771 | | |
16754 | 16772 | | |
| 16773 | + | |
16755 | 16774 | | |
16756 | 16775 | | |
16757 | 16776 | | |
| |||
16796 | 16815 | | |
16797 | 16816 | | |
16798 | 16817 | | |
| 16818 | + | |
16799 | 16819 | | |
16800 | 16820 | | |
16801 | 16821 | | |
| |||
16961 | 16981 | | |
16962 | 16982 | | |
16963 | 16983 | | |
| 16984 | + | |
16964 | 16985 | | |
16965 | 16986 | | |
16966 | 16987 | | |
| |||
16978 | 16999 | | |
16979 | 17000 | | |
16980 | 17001 | | |
| 17002 | + | |
16981 | 17003 | | |
16982 | 17004 | | |
16983 | 17005 | | |
| |||
0 commit comments