From: Jakub Kicinski <kuba@kernel.org>
To: Diogo Jahchan Koike <djahchankoike@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
syzbot+5cf270e2069645b6bd2c@syzkaller.appspotmail.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch net-next v2] ethtool: cabletest: fix wrong conditional check
Date: Tue, 27 Aug 2024 19:33:25 -0700 [thread overview]
Message-ID: <20240827193325.68bc341a@kernel.org> (raw)
In-Reply-To: <20240828021005.9886-1-djahchankoike@gmail.com>
On Tue, 27 Aug 2024 23:09:19 -0300 Diogo Jahchan Koike wrote:
> In ethnl_act_cable_test_tdr, phydev is tested for the condition of being
> null or an error by checking IS_ERR_OR_NULL, however the result is being
> negated and lets a null phydev go through. Simply removing the logical
> NOT on the conditional suffices.
>
> Reported-by: syzbot+5cf270e2069645b6bd2c@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=5cf270e2069645b6bd2c
> Fixes: 3688ff3077d3 ("net: ethtool: cable-test: Target the command to the requested PHY")
> Signed-off-by: Diogo Jahchan Koike <djahchankoike@gmail.com>
> ---
> The previous patch was sent without the appropriate tags, apologize for
> that.
You were already told by Eric not to repost within 24h.
https://lore.kernel.org/all/CANn89iJ0qNYP8zMz6jDtP2=n23emnue4m2tyJkE64QL_xiwc9Q@mail.gmail.com/
There's already a fix from Maxime pending for this:
https://lore.kernel.org/all/20240827092314.2500284-1-maxime.chevallier@bootlin.com/
I didn't need to see the tags to tell you this.
> diff --git a/net/ethtool/cabletest.c b/net/ethtool/cabletest.c
> index d365ad5f5434..f25da884b3dd 100644
> --- a/net/ethtool/cabletest.c
> +++ b/net/ethtool/cabletest.c
> @@ -346,7 +346,7 @@ int ethnl_act_cable_test_tdr(struct sk_buff *skb, struct genl_info *info)
> phydev = ethnl_req_get_phydev(&req_info,
> tb[ETHTOOL_A_CABLE_TEST_TDR_HEADER],
> info->extack);
> - if (!IS_ERR_OR_NULL(phydev)) {
> + if (IS_ERR_OR_NULL(phydev)) {
> ret = -EOPNOTSUPP;
> goto out_dev_put;
> }
--
pw-bot: nap
pv-bot: 24h
prev parent reply other threads:[~2024-08-28 2:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 2:09 [patch net-next v2] ethtool: cabletest: fix wrong conditional check Diogo Jahchan Koike
2024-08-28 2:33 ` Jakub Kicinski [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=20240827193325.68bc341a@kernel.org \
--to=kuba@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=davem@davemloft.net \
--cc=djahchankoike@gmail.com \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=syzbot+5cf270e2069645b6bd2c@syzkaller.appspotmail.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).