Skip to content

Commit ab832b8

Browse files
Jakub Kicinskidavem330
authored andcommitted
nfp: make sure to cancel port refresh on the error path
If very last stages of netdev registering and init fail some other netdevs and devlink ports may have been visible to user space before we torn them back down. In this case there is a slight chance user may have triggered port refresh. We need to make sure the async work is cancelled. We have to cancel after releasing pf->lock, so we will always try to cancel, regardless of which part of probe has failed. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 7fa1365 commit ab832b8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/netronome/nfp/nfp_net_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,7 @@ int nfp_net_pci_probe(struct nfp_pf *pf)
813813
nfp_cpp_area_release_free(pf->data_vnic_bar);
814814
err_unlock:
815815
mutex_unlock(&pf->lock);
816+
cancel_work_sync(&pf->port_refresh_work);
816817
return err;
817818
}
818819

0 commit comments

Comments
 (0)