OSDN Git Service

Bluetooth: switch to lock_sock in RFCOMM
authorDesmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
Tue, 10 Aug 2021 04:14:09 +0000 (12:14 +0800)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 10 Aug 2021 17:40:48 +0000 (10:40 -0700)
commitb7ce436a5d798bc59e71797952566608a4b4626b
tree4027da5c88197d11c1f693419b636c74904fccea
parent3f2c89fb465f63fe14da804a8afcd7ac6776508e
Bluetooth: switch to lock_sock in RFCOMM

Other than rfcomm_sk_state_change and rfcomm_connect_ind, functions in
RFCOMM use lock_sock to lock the socket.

Since bh_lock_sock and spin_lock_bh do not provide synchronization
with lock_sock, these calls should be changed to lock_sock.

This is now safe to do because packet processing is now done in a
workqueue instead of a tasklet, so bh_lock_sock/spin_lock_bh are no
longer necessary to synchronise between user contexts and SOFTIRQ
processing.

Signed-off-by: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/rfcomm/sock.c