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: <20220311082611.5bca7d5c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Fri, 11 Mar 2022 08:26:11 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Leon Romanovsky <leonro@...dia.com>
Cc:     <idosch@...dia.com>, <petrm@...dia.com>,
        <simon.horman@...igine.com>, <netdev@...r.kernel.org>,
        <jiri@...nulli.us>
Subject: Re: [RFT net-next 1/6] devlink: expose instance locking and add
 locked port registering

On Fri, 11 Mar 2022 18:09:36 +0200 Leon Romanovsky wrote:
> What about this?

Is it better? Can do it you prefer, but I'd lean towards a version
without an ifdef myself.

> diff --git a/include/net/devlink.h b/include/net/devlink.h
> index 8d5349d2fb68..33b47d1a6800 100644
> --- a/include/net/devlink.h
> +++ b/include/net/devlink.h
> @@ -1762,5 +1762,12 @@ devlink_compat_switch_id_get(struct net_device *dev,
>  }
>  
>  #endif
> -
> +#if IS_ENABLED(CONFIG_LOCKDEP)
> +bool devl_lock_is_held(struct devlink *devlink);
> +#else
> +static inline bool devl_lock_is_held(struct devlink *devlink)
> +{
> +       return true;
> +}
> +#endif
>  #endif /* _NET_DEVLINK_H_ */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ