mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 22:25:03 +00:00
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>
This commit is contained in:
parent
7fa136531e
commit
ab832b8de4
1 changed files with 1 additions and 0 deletions
|
@ -813,6 +813,7 @@ int nfp_net_pci_probe(struct nfp_pf *pf)
|
|||
nfp_cpp_area_release_free(pf->data_vnic_bar);
|
||||
err_unlock:
|
||||
mutex_unlock(&pf->lock);
|
||||
cancel_work_sync(&pf->port_refresh_work);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue