From: Kohei Enju <kohei@enjuk.jp>
To: Matt Vollrath <tactii@gmail.com>
Cc: intel-wired-lan@osuosl.org
Subject: Re: [Intel-wired-lan] [PATCH net] i40e: Cleanup PTP upon probe failure
Date: Mon, 6 Apr 2026 02:03:48 +0900 [thread overview]
Message-ID: <adKGaJoGMhivmgBC@x1> (raw)
In-Reply-To: <f8ffc8de-4b1b-40fd-8807-ee8687fa984f@gmail.com>
On 04/04 11:19, Matt Vollrath wrote:
> Fix two conditions which would leak PTP registration on probe failure:
>
> 1. i40e_setup_pf_switch can encounter an error in
> i40e_setup_pf_filter_control, call i40e_ptp_init, then return
> non-zero, sending i40e_probe to err_vsis.
>
> 2. i40e_setup_misc_vector can return non-zero, sending i40e_probe to
> err_vsis.
>
> Found with coccinelle.
>
Isn't a Fixes: tag needed?
> Signed-off-by: Matt Vollrath <tactii@gmail.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index 598739220dfb..dacdf5fad2ea 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -16112,6 +16112,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> /* Unwind what we've done if something failed in the setup */
> err_vsis:
> set_bit(__I40E_DOWN, pf->state);
> + i40e_ptp_stop(pf);
Perhaps this is a separate issue from this one, but if i40e_probe()
fails and jumps to err_switch_setup, doesn't pf->ptp_pins leak?
Also, maybe because I'm not very familiar with this driver, I don't
understand why i40e_ptp_alloc_pins() is called this early, outside of
i40e_ptp_init(). It seems to make the error-path handling a bit more
complicated.
> i40e_clear_interrupt_scheme(pf);
> kfree(pf->vsi);
> err_switch_setup:
> --
> 2.43.0
This diff seems mangled, and doesn't apply to my local trees.
Email header says:
User-Agent: Mozilla Thunderbird
...
Content-Type: text/plain; charset=UTF-8; format=flowed
It may be worth disabling format=flowed if you use Thunderbird.
See also: https://docs.kernel.org/process/email-clients.html
next prev parent reply other threads:[~2026-04-05 18:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-04 15:19 [Intel-wired-lan] [PATCH net] i40e: Cleanup PTP upon probe failure Matt Vollrath
2026-04-05 17:03 ` Kohei Enju [this message]
2026-04-05 17:31 ` Matt Vollrath
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=adKGaJoGMhivmgBC@x1 \
--to=kohei@enjuk.jp \
--cc=intel-wired-lan@osuosl.org \
--cc=tactii@gmail.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