Re: [PATCH net] i40e: fix netdev leak in i40e_vsi_setup() error paths
From: Dawei Feng
Date: Tue Jun 02 2026 - 23:35:20 EST
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