From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+55cd5225f71c5cff7f6f@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [bluetooth?] BUG: sleeping function called from invalid context in lock_sock_nested (3)
Date: Sat, 29 Jun 2024 19:33:29 +0800 [thread overview]
Message-ID: <20240629113329.2452-1-hdanton@sina.com> (raw)
In-Reply-To: <00000000000001140f061c0322d0@google.com>
On Sat, 29 Jun 2024 01:27:21 -0700
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 6c0483dbfe72 Merge tag 'nfsd-6.10-3' of git://git.kernel.o..
> git tree: upstream
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15373b8e980000
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6c0483dbfe72
--- x/net/bluetooth/sco.c
+++ y/net/bluetooth/sco.c
@@ -1287,16 +1287,19 @@ static void sco_conn_ready(struct sco_co
return;
}
+ sock_hold(parent);
+ sco_conn_unlock(conn);
lock_sock(parent);
sk = sco_sock_alloc(sock_net(parent), NULL,
BTPROTO_SCO, GFP_ATOMIC, 0);
if (!sk) {
release_sock(parent);
- sco_conn_unlock(conn);
+ sock_put(parent);
return;
}
+ sco_conn_lock(conn);
sco_sock_init(sk, parent);
bacpy(&sco_pi(sk)->src, &conn->hcon->src);
@@ -1313,9 +1316,9 @@ static void sco_conn_ready(struct sco_co
/* Wake up parent */
parent->sk_data_ready(parent);
- release_sock(parent);
-
sco_conn_unlock(conn);
+ release_sock(parent);
+ sock_put(parent);
}
}
--
next prev parent reply other threads:[~2024-06-29 11:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 12:58 syzbot
2024-05-13 23:26 ` Hillf Danton
2024-06-29 8:27 ` syzbot
2024-06-29 11:33 ` Hillf Danton [this message]
2024-06-29 13:26 ` syzbot
2025-07-28 13:12 ` Forwarded: " syzbot
[not found] <20250728131216.479387-1-aha310510@gmail.com>
2025-07-28 19:01 ` 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=20240629113329.2452-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+55cd5225f71c5cff7f6f@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.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®