Thread (1 message) flat view 1 message, 1 author, 2022-03-10

RE: [PATCH net] ice: Fix race condition during interface enslave

From: "Ertman, David M" <david.m.ertman@intel.com>
Date: 2022-03-10 19:26:29
Also in: intel-wired-lan, lkml

-----Original Message-----
From: Ivan Vecera <ivecera@redhat.com>
Sent: Thursday, March 10, 2022 10:07 AM
To: Ertman, David M <david.m.ertman@intel.com>
Cc: netdev@vger.kernel.org; Petr Oros <redacted>; Brandeburg,
Jesse [off-list ref]; Nguyen, Anthony L
[off-list ref]; David S. Miller [off-list ref];
Jakub Kicinski [off-list ref]; moderated list:INTEL ETHERNET DRIVERS"
[off-list ref], open list [off-list ref]
Subject: Re: [PATCH net] ice: Fix race condition during interface enslave

On Thu, 10 Mar 2022 17:48:16 +0000
"Ertman, David M" [off-list ref] wrote:
quoted
This only addresses one case of unplugging the auxiliary bus.  Rather than
controlling one instance of
quoted
calling ice_unplig_aux_dev(), it seems like it would be better to modify
ice_unplug_aux_dev so that it
quoted
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
You are correct.  I forgot about the RTNL context!

With this in mind - I agree with your approach.

Reviewed-by: Dave Ertman <david.m.ertman@intel.com>

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help