]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: wait for posted reconfigs when disabling the device
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 29 Aug 2018 19:46:08 +0000 (12:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 1 Sep 2018 06:01:30 +0000 (23:01 -0700)
commitde6c4b9106cd34fb195b33f85acc1ae9de6177f9
treefa1892e0f5434647c80e829f98cb11ac68159c93
parent0505b1742f2a09a1f479c31a268abd2a20e6e07a
nfp: wait for posted reconfigs when disabling the device

To avoid leaking a running timer we need to wait for the
posted reconfigs after netdev is unregistered.  In common
case the process of deinitializing the device will perform
synchronous reconfigs which wait for posted requests, but
especially with VXLAN ports being actively added and removed
there can be a race condition leaving a timer running after
adapter structure is freed leading to a crash.

Add an explicit flush after deregistering and for a good
measure a warning to check if timer is running just before
structures are freed.

Fixes: 7a1056fd35fc ("nfp: add async reconfiguration mechanism")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c