[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230106131934.14e7a900@kernel.org>
Date: Fri, 6 Jan 2023 13:19:34 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Jacob Keller <jacob.e.keller@...el.com>
Cc: <davem@...emloft.net>, <netdev@...r.kernel.org>,
<edumazet@...gle.com>, <pabeni@...hat.com>, <jiri@...nulli.us>
Subject: Re: [PATCH net-next 4/9] devlink: always check if the devlink
instance is registered
On Fri, 6 Jan 2023 09:03:18 -0800 Jacob Keller wrote:
> > +static inline bool devl_is_registered(struct devlink *devlink)
> > +{
> > + /* To prevent races the caller must hold the instance lock
> > + * or another lock taken during unregistration.
> > + */
>
> Why not just lockdep_assert here on the instance lock? I guess this
> comment implies that another lock could be used instead but it seems
> weird to allow that? I guess because of things like the linecards_lock
> as opposed to the instance lock?
Yup, as discussed on the RFC - removing the regions lock specifically
is quite tricky.
Powered by blists - more mailing lists