From: "Creeley, Brett" <bcreeley@amd.com>
To: Guangshuo Li <lgs201920130244@gmail.com>,
Brett Creeley <brett.creeley@amd.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Thomas Gleixner <tglx@kernel.org>, Kees Cook <kees@kernel.org>,
Takashi Iwai <tiwai@suse.de>,
Vivian Wang <wangruikang@iscas.ac.cn>,
Shannon Nelson <sln@onemain.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: Re: [PATCH] net: ionic: free VF resources on remove
Date: Mon, 21 Sep 2026 11:58:01 -0700 [thread overview]
Message-ID: <83dc952f-82c4-401b-8eed-f7aea38dc141@amd.com> (raw)
In-Reply-To: <20260916053117.2906446-1-lgs201920130244@gmail.com>
On 9/15/2026 10:31 PM, Guangshuo Li wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> ionic_probe() allocates VF tracking data and maps a statistics buffer
> for each already enabled VF with ionic_vf_alloc().
>
> The probe failure path releases these resources with
> ionic_vf_dealloc(). However, after a successful probe, ionic_remove()
> tears down the LIF and device without releasing the VF resources.
>
> This leaves the VF tracking allocation and statistics DMA mappings
> behind when the PF driver is removed.
>
> Call ionic_vf_dealloc() before deinitializing the LIF so the VF
> statistics addresses can be cleared and the associated DMA mappings
> and tracking data released.
>
> This issue was found by manual code inspection.
>
> Fixes: fbb39807e9ae ("ionic: support sr-iov operations")
> Cc: stable@vger.kernel.org
> Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
> ---
> drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> index 05f19489ec5c..666efe972de7 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> @@ -424,6 +424,7 @@ static void ionic_remove(struct pci_dev *pdev)
> ionic_auxbus_unregister(ionic->lif);
> ionic_lif_unregister(ionic->lif);
> ionic_devlink_unregister(ionic);
> + ionic_vf_dealloc(ionic);
I meant to respond, but didn't. Anyway this LGTM, thanks for the patch.
At this point it's not worth anything, but still:
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
> ionic_lif_deinit(ionic->lif);
> ionic_lif_free(ionic->lif);
> ionic->lif = NULL;
> --
> 2.43.0
>
prev parent reply other threads:[~2026-09-21 18:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 5:31 Guangshuo Li
2026-09-17 20:33 ` netdev-bot+sashiko
2026-09-19 0:10 ` patchwork-bot+netdevbpf
2026-09-21 18:58 ` Creeley, Brett [this message]
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=83dc952f-82c4-401b-8eed-f7aea38dc141@amd.com \
--to=bcreeley@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=brett.creeley@amd.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=lgs201920130244@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sln@onemain.com \
--cc=stable@vger.kernel.org \
--cc=tglx@kernel.org \
--cc=tiwai@suse.de \
--cc=wangruikang@iscas.ac.cn \
/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
all inboxes | Powered by JetHome®