Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7567b20 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville
Browse files

bluetooth l2cap: fix locking in l2cap_global_chan_by_psm



read_lock() ... read_unlock_bh() is clearly bogus.
This was broken by

commit 23691d75
Author: Gustavo F. Padovan <padovan@profusion.mobi>
Date:   Wed Apr 27 18:26:32 2011 -0300

    Bluetooth: Remove l2cap_sk_list

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 21fdc872
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -906,7 +906,7 @@ static struct l2cap_chan *l2cap_global_chan_by_psm(int state, __le16 psm, bdaddr
		if (c->psm == psm) {
		if (c->psm == psm) {
			/* Exact match. */
			/* Exact match. */
			if (!bacmp(&bt_sk(sk)->src, src)) {
			if (!bacmp(&bt_sk(sk)->src, src)) {
				read_unlock_bh(&chan_list_lock);
				read_unlock(&chan_list_lock);
				return c;
				return c;
			}
			}