All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+c641161e97237326ea74@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] WARNING: lock held when returning to user space in ethnl_act_cable_test
Date: Mon, 26 Aug 2024 04:43:52 -0700	[thread overview]
Message-ID: <000000000000a3bc54062094a3a9@google.com> (raw)
In-Reply-To: <00000000000045769206209237db@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: WARNING: lock held when returning to user space in ethnl_act_cable_test
Author: djahchankoike@gmail.com

#syz test

Fix an unreleased lock when taking the out_dev_put path.

Signed-off-by: Diogo Jahchan Koike <djahchankoike@gmail.com>
---
I'm not entirely sure why are there two labels
when all paths should release the lock, maybe
remove out_dev_put and out_rtnl for a simpler
out? I've kept it just in case, but I can make
the change if needed.
---
 net/ethtool/cabletest.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ethtool/cabletest.c b/net/ethtool/cabletest.c
index 01db8f394869..c6ca1107c470 100644
--- a/net/ethtool/cabletest.c
+++ b/net/ethtool/cabletest.c
@@ -77,6 +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;
+		rtnl_unlock();
 		goto out_dev_put;
 	}
 
-- 
2.43.0


  reply	other threads:[~2024-08-26 11:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26  8:50 [syzbot] [net?] WARNING: lock held when returning to user space in ethnl_act_cable_test syzbot
2024-08-26 11:43 ` syzbot [this message]
2024-08-26 11:54 ` Maxime Chevallier

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=000000000000a3bc54062094a3a9@google.com \
    --to=syzbot+c641161e97237326ea74@syzkaller.appspotmail.com \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.