Skip to content

Commit 0e98fcc

Browse files
author
Shruti Parab
committed
bnxt_en: fix module unload sequence
JIRA: https://issues.redhat.com/browse/RHEL-76565 commit 927069d Author: Vadim Fedorenko <vadim.fedorenko@linux.dev> Date: Wed Apr 30 10:03:43 2025 -0700 bnxt_en: fix module unload sequence Recent updates to the PTP part of bnxt changed the way PTP FIFO is cleared, skbs waiting for TX timestamps are now cleared during ndo_close() call. To do clearing procedure, the ptp structure must exist and point to a valid address. Module destroy sequence had ptp clear code running before netdev close causing invalid memory access and kernel crash. Change the sequence to destroy ptp structure after device close. Fixes: 8f7ae5a ("bnxt_en: improve TX timestamping FIFO configuration") Reported-by: Taehee Yoo <ap420073@gmail.com> Closes: https://lore.kernel.org/netdev/CAMArcTWDe2cd41=ub=zzvYifaYcYv-N-csxfqxUvejy_L0D6UQ@mail.gmail.com/ Signed-off-by: Vadim Fedorenko <vadfed@meta.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Michael Chan <michael.chan@broadcom.com> Tested-by: Taehee Yoo <ap420073@gmail.com> Link: https://patch.msgid.link/20250430170343.759126-1-vadfed@meta.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Shruti Parab <shruti.parab@broadcom.com>
1 parent f5474e5 commit 0e98fcc

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+1
-1
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15857,8 +15857,8 @@ static void bnxt_remove_one(struct pci_dev *pdev)
1585715857

1585815858
bnxt_rdma_aux_device_del(bp);
1585915859

15860-
bnxt_ptp_clear(bp);
1586115860
unregister_netdev(dev);
15861+
bnxt_ptp_clear(bp);
1586215862

1586315863
bnxt_rdma_aux_device_uninit(bp);
1586415864

0 commit comments

Comments
 (0)