From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Vecera Date: Thu, 10 Mar 2022 19:06:42 +0100 Subject: [Intel-wired-lan] [PATCH net] ice: Fix race condition during interface enslave In-Reply-To: References: <20220310171641.3863659-1-ivecera@redhat.com> Message-ID: <20220310190642.556063ae@ceranb> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: intel-wired-lan@osuosl.org List-ID: On Thu, 10 Mar 2022 17:48:16 +0000 "Ertman, David M" wrote: > This only addresses one case of unplugging the auxiliary bus. Rather than controlling one instance of > calling ice_unplig_aux_dev(), it seems like it would be better to modify ice_unplug_aux_dev so that it > will pause until any plugging is done by the service task (check for the pf->flag bit and wait until it clears > before progressing). You cannot wait in ice_unplug_aux_dev() for ICE_FLAG_PLUG_AUX_DEV to be cleared because ice_clear_rdma_cap() is called under RTNL. This patch is a counter part for commit 5dbbbd01cbba83 ("ice: Avoid RTNL lock when re-creating auxiliary device") that eliminates ice_plug_aux() and fixed first part of deadlock and this patch fixes a second part and eliminates also ice_unplug_aux_dev() to be called under RTNL. Thanks, Ivan