From: Paolo Abeni <pabeni@redhat.com>
To: "Ludvig Pärsson" <ludvig.parsson@axis.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@axis.com
Subject: Re: [PATCH net] ethtool: netlink: Add missing ethnl_ops_begin/complete
Date: Thu, 11 Jan 2024 12:30:16 +0100 [thread overview]
Message-ID: <4d927762575cb4b453d6651dcf8f2d1e58b1c778.camel@redhat.com> (raw)
In-Reply-To: <20240108-etht2-v1-1-beab95e80f7e@axis.com>
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@axis.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
prev parent reply other threads:[~2024-01-11 11:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-08 15:17 Ludvig Pärsson
2024-01-11 11:30 ` Paolo Abeni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4d927762575cb4b453d6651dcf8f2d1e58b1c778.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kernel@axis.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ludvig.parsson@axis.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®