Re: [PATCH net v2] bnxt_en: Take RTNL before netif_close() when aborting FW reset

From: Michael Chan

Date: Tue Nov 03 2026 - 13:50:57 EST


On Mon, Nov 2, 2026 at 8:22 PM Bryan Cochrane <bcochrane@xxxxxxxxxx> wrote:

> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index 33c4cacc8ffe..1ea1e8266eab 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -14860,9 +14860,16 @@ void bnxt_fw_reset(struct bnxt *bp)
> if (n < 0) {
> netdev_err(bp->dev, "Firmware reset aborted, rc = %d\n",
> n);
> + /* netif_close() requires RTNL, which must be taken
> + * before the netdev instance lock.
> + */
> + netdev_unlock(bp->dev);
> + rtnl_lock();
> + netdev_lock(bp->dev);

If you need to respin, you should be able to call bnxt_rtnl_lock_sp()
instead of the 2 locking calls. But this is fine too. Thanks.

Reviewed-by: Michael Chan <michael.chan@xxxxxxxxxxxx>

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature