All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 6lowpan: Add missing locking
@ 2020-09-20  9:08 Pavel Machek
  0 siblings, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2020-09-20  9:08 UTC (permalink / raw)
  To: gregkh, linux-kernel, syzbot+96414aa0033c363d8458, koulihong, marcel

[-- 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 --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread
[parent not found: <2325b986-a4ea-9aa3-40ba-702ebe9b519c@web.de>]

end of thread, other threads:[~2020-09-20 20:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-20  9:08 [PATCH] 6lowpan: Add missing locking Pavel Machek
     [not found] <2325b986-a4ea-9aa3-40ba-702ebe9b519c@web.de>
2020-09-20 20:51 ` Pavel Machek
2020-09-20 20:51   ` Pavel Machek

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.