lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220701093316.410157f3@kernel.org>
Date:   Fri, 1 Jul 2022 09:33:16 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Jiri Pirko <jiri@...nulli.us>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, pabeni@...hat.com,
        edumazet@...gle.com, mlxsw@...dia.com, saeedm@...dia.com,
        moshe@...dia.com
Subject: Re: [patch net-next 2/3] net: devlink: call lockdep_assert_held()
 for devlink->lock directly

On Fri,  1 Jul 2022 11:59:25 +0200 Jiri Pirko wrote:
> In devlink.c there is direct access to whole struct devlink so there is
> no need to use helper. So obey the customs and work with lock directly
> avoiding helpers which might obfuscate things a bit.

> diff --git a/net/core/devlink.c b/net/core/devlink.c
> index 25b481dd1709..a7477addbd59 100644
> --- a/net/core/devlink.c
> +++ b/net/core/devlink.c
> @@ -10185,7 +10185,7 @@ int devl_rate_leaf_create(struct devlink_port *devlink_port, void *priv)
>  	struct devlink *devlink = devlink_port->devlink;
>  	struct devlink_rate *devlink_rate;
>  
> -	devl_assert_locked(devlink_port->devlink);
> +	lockdep_assert_held(&devlink_port->devlink->lock);

I don't understand why. Do we use lockdep asserts directly on rtnl_mutex
in rtnetlink.c?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ