From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] nfp: wait for posted reconfigs when disabling the device Date: Fri, 31 Aug 2018 23:03:31 -0700 (PDT) Message-ID: <20180831.230331.14742184049369665.davem@davemloft.net> References: <20180829194608.25454-1-jakub.kicinski@netronome.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, oss-drivers@netronome.com To: jakub.kicinski@netronome.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:43970 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726044AbeIAKOU (ORCPT ); Sat, 1 Sep 2018 06:14:20 -0400 In-Reply-To: <20180829194608.25454-1-jakub.kicinski@netronome.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Jakub Kicinski Date: Wed, 29 Aug 2018 12:46:08 -0700 > 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: 3d780b926a12 ("nfp: add async reconfiguration mechanism") > Signed-off-by: Jakub Kicinski > Reviewed-by: Dirk van der Merwe Applied and queued up for -stable.