public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Breno Leitao <leitao@debian.org>
Cc: Michael Chan <michael.chan@broadcom.com>,
	Pavan Chebbi <pavan.chebbi@broadcom.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Richard Cochran <richardcochran@gmail.com>,
	"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
	Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com, stable@vger.kernel.org
Subject: Re: [PATCH net v2] bnxt_en: Fix NULL pointer crash in bnxt_ptp_enable during error cleanup
Date: Mon, 5 Jan 2026 16:04:58 -0800	[thread overview]
Message-ID: <20260105160458.5483a5ea@kernel.org> (raw)
In-Reply-To: <20260105-bnxt-v2-1-9ac69edef726@debian.org>

On Mon, 05 Jan 2026 04:00:16 -0800 Breno Leitao wrote:
>  init_err_pci_clean:
>  	bnxt_hwrm_func_drv_unrgtr(bp);
> +	bnxt_ptp_clear(bp);
> +	kfree(bp->ptp_cfg);
>  	bnxt_free_hwrm_resources(bp);
>  	bnxt_hwmon_uninit(bp);
>  	bnxt_ethtool_free(bp);
> -	bnxt_ptp_clear(bp);
> -	kfree(bp->ptp_cfg);
>  	bp->ptp_cfg = NULL;

Is there a reason to leave clearing of the pointer behind?
I don't see it mentioned in the commit msg..
Checking previous discussion it sounds like Pavan asked for the
clearing to also be moved.

>  	kfree(bp->fw_health);
>  	bp->fw_health = NULL;

  parent reply	other threads:[~2026-01-06  0:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05 12:00 [PATCH net v2] bnxt_en: Fix NULL pointer crash in bnxt_ptp_enable during error cleanup Breno Leitao
2026-01-05 13:29 ` Russell King (Oracle)
2026-01-05 14:11   ` Breno Leitao
2026-01-05 14:27     ` Russell King (Oracle)
2026-01-05 15:51   ` Pavan Chebbi
2026-01-05 17:40     ` Michael Chan
2026-01-05 18:03       ` Russell King (Oracle)
2026-01-05 18:29         ` Michael Chan
2026-01-06  0:04 ` Jakub Kicinski [this message]
2026-01-06 11:33   ` Breno Leitao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260105160458.5483a5ea@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kernel-team@meta.com \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.com \
    --cc=richardcochran@gmail.com \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=stable@vger.kernel.org \
    --cc=vadim.fedorenko@linux.dev \
    --cc=vladimir.oltean@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox