]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
nfp: make sure representors are destroyed before their lower netdev
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 23 Aug 2017 06:22:43 +0000 (23:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Aug 2017 03:39:44 +0000 (20:39 -0700)
commit326ce603015eefaa86fc6e490f43638e1010a838
tree2550513eb676413deb39f95c07d9f30c2ceb1754
parentd6e1ab9ea3514840e4f32957c457b094646c2e9d
nfp: make sure representors are destroyed before their lower netdev

App start/stop callbacks can perform application initialization.
Unfortunately, flower app started using them for creating and
destroying representors.  This can lead to a situation where
lower vNIC netdev is destroyed while representors still try
to pass traffic.  This will most likely lead to a NULL-dereference
on the lower netdev TX path.

Move the start/stop callbacks, so that representors are created/
destroyed when vNICs are fully initialized.

Fixes: 5de73ee46704 ("nfp: general representor implementation")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_main.c