From: Diogo Jahchan Koike <djahchankoike@gmail.com>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: Diogo Jahchan Koike <djahchankoike@gmail.com>,
syzbot+c641161e97237326ea74@syzkaller.appspotmail.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [patch net-next v2] net: fix unreleased lock in cable test
Date: Mon, 26 Aug 2024 10:45:46 -0300 [thread overview]
Message-ID: <20240826134656.94892-1-djahchankoike@gmail.com> (raw)
In-Reply-To: <20240826121435.88756-1-djahchankoike@gmail.com>
fix an unreleased lock in out_dev_put path by removing the (now)
unnecessary path.
Reported-by: syzbot+c641161e97237326ea74@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=c641161e97237326ea74
Fixes: 3688ff3077d3 ("net: ethtool: cable-test: Target the command to the requested PHY")
Signed-off-by: Diogo Jahchan Koike <djahchankoike@gmail.com>
---
net/ethtool/cabletest.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/ethtool/cabletest.c b/net/ethtool/cabletest.c
index 01db8f394869..8c5aa63cb1aa 100644
--- a/net/ethtool/cabletest.c
+++ b/net/ethtool/cabletest.c
@@ -77,7 +77,7 @@ int ethnl_act_cable_test(struct sk_buff *skb, struct genl_info *info)
info->extack);
if (IS_ERR_OR_NULL(phydev)) {
ret = -EOPNOTSUPP;
- goto out_dev_put;
+ goto out_rtnl;
}
ops = ethtool_phy_ops;
@@ -99,7 +99,6 @@ int ethnl_act_cable_test(struct sk_buff *skb, struct genl_info *info)
out_rtnl:
rtnl_unlock();
-out_dev_put:
ethnl_parse_header_dev_put(&req_info);
return ret;
}
--
2.43.0
next parent reply other threads:[~2024-08-26 13:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240826121435.88756-1-djahchankoike@gmail.com>
2024-08-26 13:45 ` Diogo Jahchan Koike [this message]
2024-08-26 16:16 ` [patch net-next v2] net: fix unreleased lock in cable test Maxime Chevallier
2024-08-27 20:10 ` 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=20240826134656.94892-1-djahchankoike@gmail.com \
--to=djahchankoike@gmail.com \
--cc=christophe.leroy@csgroup.eu \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=syzbot+c641161e97237326ea74@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