Re: [PATCH net] i40e: fix netdev leak in i40e_vsi_setup() error paths

From: Shannon Nelson

Date: Wed Jun 03 2026 - 12:38:10 EST


On 6/2/26 20:28, Dawei Feng wrote:
Hi Shannon,

Thanks for the suggestion. I took a closer look at the cleanup paths, and
I think the localized v1 fix is safer here.

In particular, i40e_vsi_reinit_setup() has early failure paths that can
reach i40e_vsi_clear() before unregister_netdev() is called. Moving
free_netdev() into i40e_vsi_clear() could therefore free a
still-registered netdev.

So I plan to keep the current v1 approach for this fix, rather than moving
free_netdev() into the common VSI teardown path.

Best regards,
Dawei

That sounds fine, thanks for looking.
sln