Bluetooth: Add l2cap_chan_lock
Channel lock will be used to lock L2CAP channels which are locked currently by socket locks. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Reviewed-by: Ulisses Furquim <ulisses@profusion.mobi> Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
committed by
Johan Hedberg
parent
3df91ea20e
commit
c03b355ea2
@ -247,6 +247,8 @@ struct l2cap_chan *l2cap_chan_create(struct sock *sk)
|
||||
if (!chan)
|
||||
return NULL;
|
||||
|
||||
mutex_init(&chan->lock);
|
||||
|
||||
chan->sk = sk;
|
||||
|
||||
write_lock(&chan_list_lock);
|
||||
|
Reference in New Issue
Block a user