linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	thomas.petazzoni@bootlin.com, "Andrew Lunn" <andrew@lunn.ch>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Eric Dumazet" <edumazet@google.com>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Russell King" <linux@armlinux.org.uk>,
	linux-arm-kernel@lists.infradead.org,
	"Christophe Leroy" <christophe.leroy@csgroup.eu>,
	"Herve Codina" <herve.codina@bootlin.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	"Vladimir Oltean" <vladimir.oltean@nxp.com>,
	"Köry Maincent" <kory.maincent@bootlin.com>,
	"Marek Behún" <kabel@kernel.org>,
	"Piergiorgio Beruto" <piergiorgio.beruto@gmail.com>,
	"Oleksij Rempel" <o.rempel@pengutronix.de>,
	"Nicolò Veronese" <nicveronese@gmail.com>,
	"Simon Horman" <horms@kernel.org>,
	mwojtas@chromium.org, "Nathan Chancellor" <nathan@kernel.org>,
	"Antoine Tenart" <atenart@kernel.org>,
	"Marc Kleine-Budde" <mkl@pengutronix.de>,
	"Dan Carpenter" <dan.carpenter@linaro.org>,
	"Romain Gantois" <romain.gantois@bootlin.com>,
	syzbot+e9ed4e4368d450c8f9db@syzkaller.appspotmail.com,
	davem@davemloft.net
Subject: Re: [PATCH net-next] net: ethtool: phy: Don't set the context dev pointer for unfiltered DUMP
Date: Fri, 13 Sep 2024 17:40:52 +0100	[thread overview]
Message-ID: <14e6f307-1aaa-4862-a22f-4833fc18920a@linux.dev> (raw)
In-Reply-To: <20240913100515.167341-1-maxime.chevallier@bootlin.com>

On 13/09/2024 11:05, Maxime Chevallier wrote:
> The context info allows continuing DUMP requests, shall they fill the
> netlink buffer.
> 
> In the case of filtered DUMP requests, a reference on the netdev is
> grabbed in the .start() callback and release in .done().
> 
> Unfiltered DUMP request don't need the dev pointer to be set in the context
> info, doing so will trigger an unwanted netdev_put() in .done().
> 
> Reported-by: syzbot+e9ed4e4368d450c8f9db@syzkaller.appspotmail.com
> Closes: https://lore.kernel.org/netdev/000000000000d3bf150621d361a7@google.com/
> Fixes: 17194be4c8e1 ("net: ethtool: Introduce a command to list PHYs on an interface")
> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> ---
> This patch fixes a commit that still lives in net-next.
> 
>   net/ethtool/phy.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/net/ethtool/phy.c b/net/ethtool/phy.c
> index 4ef7c6e32d10..ed8f690f6bac 100644
> --- a/net/ethtool/phy.c
> +++ b/net/ethtool/phy.c
> @@ -251,8 +251,6 @@ static int ethnl_phy_dump_one_dev(struct sk_buff *skb, struct net_device *dev,
>   	int ret = 0;
>   	void *ehdr;
>   
> -	pri->base.dev = dev;
> -
>   	if (!dev->link_topo)
>   		return 0;
>   

I've checked that this is leftover from the previous series.

Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>


  reply	other threads:[~2024-09-13 16:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-13 10:05 [PATCH net-next] net: ethtool: phy: Don't set the context dev pointer for unfiltered DUMP Maxime Chevallier
2024-09-13 16:40 ` Vadim Fedorenko [this message]
2024-09-14  4:50 ` patchwork-bot+netdevbpf

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=14e6f307-1aaa-4862-a22f-4833fc18920a@linux.dev \
    --to=vadim.fedorenko@linux.dev \
    --cc=andrew@lunn.ch \
    --cc=atenart@kernel.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=dan.carpenter@linaro.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=herve.codina@bootlin.com \
    --cc=hkallweit1@gmail.com \
    --cc=horms@kernel.org \
    --cc=kabel@kernel.org \
    --cc=kory.maincent@bootlin.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mkl@pengutronix.de \
    --cc=mwojtas@chromium.org \
    --cc=nathan@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicveronese@gmail.com \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=piergiorgio.beruto@gmail.com \
    --cc=romain.gantois@bootlin.com \
    --cc=syzbot+e9ed4e4368d450c8f9db@syzkaller.appspotmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vladimir.oltean@nxp.com \
    /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;
as well as URLs for NNTP newsgroup(s).