android_kernel_motorola_sm6225/net/bluetooth
Johan Hedberg e1d08f4067 Bluetooth: Fix workqueue synchronization in hci_dev_open
When hci_sock.c calls hci_dev_open it needs to ensure that there isn't
pending work in progress, such as that which is scheduled for the
initial setup procedure or the one for automatically powering off after
the setup procedure. This adds the necessary calls to ensure that any
previously scheduled work is completed before attempting to call
hci_dev_do_open.

This patch fixes a race with old user space versions where we might
receive a HCIDEVUP ioctl before the setup procedure has been completed.
When that happens the setup procedures callback may fail early and leave
the device in an inconsistent state, causing e.g. the setup callback to
be (incorrectly) called more than once.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2013-10-01 23:27:08 -07:00
..
bnep Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
cmtp Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
hidp Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2013-09-06 09:30:36 -07:00
rfcomm Merge git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth 2013-09-27 11:56:14 -03:00
a2mp.c Bluetooth: Replaced kzalloc and memcpy with kmemdup 2013-03-18 14:01:50 -03:00
af_bluetooth.c Bluetooth: Add clarifying comment to bt_sock_wait_state() 2013-09-25 14:30:10 -03:00
amp.c Bluetooth: AMP: Use set_bit / test_bit for amp_mgr state 2013-01-09 17:05:05 -02:00
hci_conn.c Bluetooth: Disable upper layer connections when user channel is active 2013-09-16 14:35:56 -03:00
hci_core.c Bluetooth: Fix workqueue synchronization in hci_dev_open 2013-10-01 23:27:08 -07:00
hci_event.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth 2013-09-27 11:56:14 -03:00
hci_sock.c Bluetooth: Require CAP_NET_ADMIN for HCI User Channel operation 2013-10-02 09:10:04 +03:00
hci_sysfs.c PTR_RET is now PTR_ERR_OR_ZERO(): Replace most. 2013-07-15 11:25:01 +09:30
Kconfig Bluetooth: trivial: Remove newline before EOF 2012-10-24 00:42:47 -02:00
l2cap_core.c Bluetooth: Provide high speed configuration option 2013-10-02 09:09:59 +03:00
l2cap_sock.c Bluetooth: Provide high speed configuration option 2013-10-02 09:09:59 +03:00
lib.c bluetooth: Remove unneeded batostr function 2012-09-27 18:10:43 -03:00
Makefile Bluetooth: Enable -D__CHECK_ENDIAN__ for sparse by default 2013-10-02 09:10:05 +03:00
mgmt.c Bluetooth: Send new settings event when changing high speed option 2013-10-02 09:10:01 +03:00
sco.c Bluetooth: Prevent transparent SCO on older devices 2013-08-21 16:47:12 +02:00
smp.c Bluetooth: Fix checks for LE support on LE-only controllers 2013-06-12 10:20:54 -04:00