[Intel-wired-lan] [PATCH v5 net 6/7] i40e: do not expose netdev too early

Mekala, SunithaX D sunithax.d.mekala at intel.com
Tue Sep 8 06:19:48 UTC 2026


> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of Maciej Fijalkowski
> Sent: Wednesday, July 1, 2026 5:45 AM
> To: intel-wired-lan at lists.osuosl.org
> Cc: netdev at vger.kernel.org; Karlsson, Magnus <magnus.karlsson at intel.com>; kuba at kernel.org; pabeni at redhat.com; horms at kernel.org; Kitszel, Przemyslaw <przemyslaw.kitszel at intel.com>; Keller, Jacob E <jacob.e.keller at intel.com>; Fijalkowski, Maciej <maciej.fijalkowski at intel.com>; Sashiko AI Review >  <sashiko-bot at kernel.org>
> Subject: [Intel-wired-lan] [PATCH v5 net 6/7] i40e: do not expose netdev too early
>
> i40e_vsi_setup() registers the netdev before rings and q_vectors are fully
> allocated and mapped. Once register_netdev() returns, userspace can reach
> netdev callbacks such as ndo_open(), so the VSI backing state must already
> be ready.
>
> Move register_netdev() to the end of the setup path, after ring/q_vector
> allocation, ring mapping and RSS configuration. Keep freeing an allocated
> but not registered netdev on the error path.
>
> Fixes: 41c445ff0f48 ("i40e: main driver core")
> Reported-by: Sashiko AI Review <sashiko-bot at kernel.org>
> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski at intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 29 ++++++++++++---------
>  1 file changed, 17 insertions(+), 12 deletions(-)

Tested-by: Sunitha Mekala <sunithax.d.mekala at intel.com> (A Contingent worker at Intel)


More information about the Intel-wired-lan mailing list