From: Pavel Machek <pavel@denx.de>
To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
syzbot+96414aa0033c363d8458@syzkaller.appspotmail.com,
koulihong@huawei.com, marcel@holtmann.org
Subject: [PATCH] 6lowpan: Add missing locking
Date: Sun, 20 Sep 2020 11:08:26 +0200 [thread overview]
Message-ID: <20200920090826.GA5983@amd> (raw)
[-- Attachment #1: Type: text/plain, Size: 765 bytes --]
I believe set_lock should be taken in exit function, too.
Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>
diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index cff4944d5b66..1420734394e9 100644
--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -1301,10 +1301,12 @@ static void __exit bt_6lowpan_exit(void)
debugfs_remove(lowpan_enable_debugfs);
debugfs_remove(lowpan_control_debugfs);
+ mutex_lock(&set_lock);
if (listen_chan) {
l2cap_chan_close(listen_chan, 0);
l2cap_chan_put(listen_chan);
}
+ mutex_unlock(&set_lock);
disconnect_devices();
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next reply other threads:[~2020-09-20 9:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-20 9:08 Pavel Machek [this message]
[not found] <2325b986-a4ea-9aa3-40ba-702ebe9b519c@web.de>
2020-09-20 20:51 ` [PATCH] 6lowpan: Add missing locking Pavel Machek
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=20200920090826.GA5983@amd \
--to=pavel@denx.de \
--cc=gregkh@linuxfoundation.org \
--cc=koulihong@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=syzbot+96414aa0033c363d8458@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