[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240402082752.GE26556@kernel.org>
Date: Tue, 2 Apr 2024 09:27:52 +0100
From: Simon Horman <horms@...nel.org>
To: Johannes Berg <johannes@...solutions.net>
Cc: netdev@...r.kernel.org, jiri@...nulli.us, jhs@...atatu.com,
victor@...atatu.com, kuba@...nel.org, pctammela@...atatu.com,
martin@...ongswan.org, Johannes Berg <johannes.berg@...el.com>
Subject: Re: [PATCH net-next v2 1/2] rtnetlink: add guard for RTNL
On Thu, Mar 28, 2024 at 08:27:49AM +0100, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@...el.com>
>
> The new guard/scoped_gard can be useful for the RTNL as well,
> so add a guard definition for it. It gets used like
>
> {
> guard(rtnl)();
> // RTNL held until end of block
> }
>
> or
>
> scoped_guard(rtnl) {
> // RTNL held in this block
> }
>
> as with any other guard/scoped_guard.
>
> Signed-off-by: Johannes Berg <johannes.berg@...el.com>
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists