> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of > Maciej Fijalkowski > Sent: Wednesday, July 1, 2026 5:45 AM > To: [email protected] > Cc: [email protected]; Karlsson, Magnus <[email protected]>; > [email protected]; [email protected]; [email protected]; Kitszel, Przemyslaw > <[email protected]>; Keller, Jacob E <[email protected]>; > Fijalkowski, Maciej <[email protected]> > Subject: [Intel-wired-lan] [PATCH v5 net 1/7] i40e: unregister netdev before > clearing VSI on reinit failure > > i40e_vsi_reinit_setup() tears down the existing VSI queue/ring backing > state before allocating replacement arrays and queue tracking. If one of > these early allocations fails, the function jumps directly to err_vsi > and calls i40e_vsi_clear(). > > For a registered netdev, this frees the VSI while > netdev_priv(netdev)->vsi can still point at it, leaving the registered > netdev with dangling private driver state. > > Split the error path so failures after destructive reinit teardown first > unregister and free the netdev before clearing the VSI. > > Fixes: d2a69fefd756 ("i40e: Fix changing previously set num_queue_pairs for > PFs") > Signed-off-by: Maciej Fijalkowski <[email protected]> > --- > drivers/net/ethernet/intel/i40e/i40e_main.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-)
Tested-by: Sunitha Mekala <[email protected]> (A Contingent worker at Intel)
