diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-06-08 20:56:10 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-09 12:52:07 -0400 |
commit | ab832b8de405c640d407b4473c6875210c326255 (patch) | |
tree | 813910b9600070fe35ffc594f3c0894e258ca10d /drivers | |
parent | 7fa136531e646b0608b08a6afa85030a57a7ff33 (diff) | |
download | linux-ab832b8de405c640d407b4473c6875210c326255.tar.bz2 |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c b/drivers/net/ethernet/netronome/nfp/nfp_net_main.c index 5f27703060c2..cdd25dc5988d 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_main.c @@ -813,6 +813,7 @@ err_ctrl_unmap: nfp_cpp_area_release_free(pf->data_vnic_bar); err_unlock: mutex_unlock(&pf->lock); + cancel_work_sync(&pf->port_refresh_work); return err; } |