From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>, davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] ethtool: fix null-ptr-deref on ref tracker
Date: Mon, 13 Dec 2021 20:46:38 -0800 [thread overview]
Message-ID: <37b65a59-b7f0-2863-5903-d806673a18b5@gmail.com> (raw)
In-Reply-To: <20211214013902.386186-1-kuba@kernel.org>
On 12/13/21 5:39 PM, Jakub Kicinski wrote:
> dev can be a NULL here, not all requests set require_dev.
>
> Fixes: e4b8954074f6 ("netlink: add net device refcount tracker to struct ethnl_req_info")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> net/ethtool/netlink.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/net/ethtool/netlink.c b/net/ethtool/netlink.c
> index 23f32a995099..767fb3f17267 100644
> --- a/net/ethtool/netlink.c
> +++ b/net/ethtool/netlink.c
> @@ -141,8 +141,10 @@ int ethnl_parse_header_dev_get(struct ethnl_req_info *req_info,
> return -EINVAL;
> }
>
Oh I am reading your patch after I sent mine.
Please use edumazet@google.com next time, because eric.dumazet@gmail.com has
huge lag (typical vger -> accounts@gmail.com issues)
Reviewed-by: Eric Dumazet <edumazet@google.com>
Thanks !
> - req_info->dev = dev;
> - netdev_tracker_alloc(dev, &req_info->dev_tracker, GFP_KERNEL);
> + if (dev) {
> + req_info->dev = dev;
> + netdev_tracker_alloc(dev, &req_info->dev_tracker, GFP_KERNEL);
> + }
> req_info->flags = flags;
> return 0;
> }
next prev parent reply other threads:[~2021-12-14 4:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-14 1:39 [PATCH net-next] ethtool: fix null-ptr-deref on ref tracker Jakub Kicinski
2021-12-14 4:46 ` Eric Dumazet [this message]
2021-12-14 12:40 ` 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=37b65a59-b7f0-2863-5903-d806673a18b5@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).