Subject: Re: [patch net-next 2/4] net: devlink: convert reload command to take implicit devlink->lock

From: Jakub Kicinski <[email-masked]>
Date: Fri, 5 Aug 2022 12:58:43 -0700

On Fri, 5 Aug 2022 16:21:16 +0000 Keller, Jacob E wrote:
> > Convert reload command to behave the same way as the rest of the
> > commands and let if be called with devlink->lock held. Remove the
> > temporary devl_lock taking from drivers. As the DEVLINK_NL_FLAG_NO_LOCK
> > flag is no longer used, remove it alongside.
> > 
> > Signed-off-by: Jiri Pirko <[email-masked]>  
> 
> Wasn't reload avoiding the lock done so that drivers could perform other devlink operations during reload? Or is that no longer a problem with the recent refactors done to move devlink initialization and such earlier so that its now safe?

Drivers have control over the lock now, they can take the lock
themselves (devl_lock()) and call the "I'm already holding the lock"
functions. So the expectation is that shared paths used by probe and
reload will always run under the lock.