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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4d927762575cb4b453d6651dcf8f2d1e58b1c778.camel@redhat.com>
Date: Thu, 11 Jan 2024 12:30:16 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Ludvig Pärsson <ludvig.parsson@...s.com>, "David S.
 Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub
 Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org, kernel@...s.com
Subject: Re: [PATCH net] ethtool: netlink: Add missing
 ethnl_ops_begin/complete

On Mon, 2024-01-08 at 16:17 +0100, Ludvig Pärsson wrote:
> Accessing an ethernet device that is powered off or clock gated might
> cause the CPU to hang. Add ethnl_ops_begin/complete in
> ethnl_set_features() to protect against this.
> 

We need a suitable Fixes tag here

> Signed-off-by: Ludvig Pärsson <ludvig.parsson@...s.com>
> ---
>  net/ethtool/features.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/net/ethtool/features.c b/net/ethtool/features.c
> index a79af8c25a07..b6cb101d7f19 100644
> --- a/net/ethtool/features.c
> +++ b/net/ethtool/features.c
> @@ -234,17 +234,20 @@ int ethnl_set_features(struct sk_buff *skb, struct genl_info *info)
>  	dev = req_info.dev;
>  
>  	rtnl_lock();
> +	ret = ethnl_ops_begin(dev);
> +	if (ret < 0)
> +		goto out_rtnl;

You should likely follow-up on net-next only converting
ethnl_set_features to ethnl_default_set_doit.

Cheers,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ