From: Ananta Srikar Puranam <srikarananta01@gmail.com>
To: syzbot+e4c27043b9315839452d@syzkaller.appspotmail.com
Cc: alibuda@linux.alibaba.com, davem@davemloft.net,
dsahern@kernel.org, dust.li@linux.alibaba.com,
edumazet@google.com, kuba@kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
pabeni@redhat.com, schnelle@linux.ibm.com,
srikarananta01@gmail.com, syzkaller-bugs@googlegroups.com,
wenjia@linux.ibm.com
Subject: Re: [syzbot] [net?] possible deadlock in do_ip_setsockopt (4)
Date: Tue, 17 Sep 2024 17:47:00 -0400 [thread overview]
Message-ID: <0d3ccb61-22e0-4aa1-97f3-ac4f08a4c20b@gmail.com> (raw)
In-Reply-To: <00000000000055b6570622575dba@google.com>
Fixed the circular lock dependency reported by syzkaller.
Signed-off-by: Ananta Srikar <srikarananta01@gmail.com>
Reported-by: syzbot+e4c27043b9315839452d@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=e4c27043b9315839452d
Fixes: d2bafcf224f3 ("Merge tag 'cgroup-for-6.11-rc4-fixes' of
git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup")
---
net/ipv4/ip_sockglue.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index cf377377b52d..a8f46d1ba62b 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -1073,9 +1073,11 @@ int do_ip_setsockopt(struct sock *sk, int level,
int optname,
}
err = 0;
+
+ sockopt_lock_sock(sk);
+
if (needs_rtnl)
rtnl_lock();
- sockopt_lock_sock(sk);
switch (optname) {
case IP_OPTIONS:
--
2.43.0
next prev parent reply other threads:[~2024-09-17 21:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-26 9:50 syzbot
2024-08-24 16:48 ` syzbot
2024-08-25 3:37 ` syzbot
2024-09-17 21:11 ` Ananta Srikar Puranam
2024-09-17 21:28 ` syzbot
2024-09-17 21:47 ` Ananta Srikar Puranam [this message]
2024-09-17 21:58 ` Ananta Srikar Puranam
2024-09-17 22:31 ` syzbot
2024-09-17 23:50 ` [PATCH] net/ipv4: Fix circular deadlock in do_ip_setsockop AnantaSrikar
2024-09-22 9:26 ` kernel test robot
2024-09-22 16:11 ` Eric Dumazet
2024-09-22 21:04 ` Ananta Srikar Puranam
2024-09-17 22:57 ` [syzbot] [PATCH] net/ipv4: Fixing circular deadlock syzbot
2025-05-29 0:01 ` [syzbot] [net?] possible deadlock in do_ip_setsockopt (4) syzbot
[not found] <20240917225638.203403-2-srikarananta01@gmail.com>
2024-09-17 23:24 ` syzbot
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=0d3ccb61-22e0-4aa1-97f3-ac4f08a4c20b@gmail.com \
--to=srikarananta01@gmail.com \
--cc=alibuda@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=dust.li@linux.alibaba.com \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=schnelle@linux.ibm.com \
--cc=syzbot+e4c27043b9315839452d@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=wenjia@linux.ibm.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
all inboxes | Powered by JetHome®