Messages in this thread | ![/](/images/icornerl.gif) | | Subject | Re: [PATCH net] ethtool: netlink: Add missing ethnl_ops_begin/complete | From | Paolo Abeni <> | Date | Thu, 11 Jan 2024 12:30:16 +0100 |
| |
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
| ![\](/images/icornerr.gif) |