Messages in this thread Patch in this message | | | Date | Sun, 20 Sep 2020 11:08:26 +0200 | From | Pavel Machek <> | Subject | [PATCH] 6lowpan: Add missing locking |
| |
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 [unhandled content-type:application/pgp-signature] | |