WSL2-Linux-Kernel/net/bluetooth
David Herrmann 794d175698 Bluetooth: hidp: Stop I/O on shutdown
Current hidp driver purges the in/out queue on HID shutdown, but does
not prevent further I/O. If a driver uses hidp_output_raw_report or
hidp_get_raw_report during shutdown, the driver hangs for 5 or 10
seconds per call until it gets a timeout.
That is, if the output queue of an HID driver has 10 messages pending,
it will take 50s until hid_destroy_device() will return. The
hidp_session_sem semaphore is held during shutdown so no other HID
device may be added/removed during this time.

This patch makes hidp_output_raw_report and hidp_get_raw_report fail if
session->terminate is true. Also hidp_session will wakeup all current
calls to these functions to cancel the current operations.

We already purge the current I/O queues on hidp_stop(), so this data loss
does not change the behaviour of the HID drivers.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-10-06 22:15:48 -03:00
..
bnep Bluetooth: Linearize skbs for use in BNEP, CMTP, HIDP, and RFCOMM 2011-09-27 18:15:55 -03:00
cmtp Bluetooth: Linearize skbs for use in BNEP, CMTP, HIDP, and RFCOMM 2011-09-27 18:15:55 -03:00
hidp Bluetooth: hidp: Stop I/O on shutdown 2011-10-06 22:15:48 -03:00
rfcomm Bluetooth: Linearize skbs for use in BNEP, CMTP, HIDP, and RFCOMM 2011-09-27 18:15:55 -03:00
Kconfig bluetooth: uses crypto interfaces, select CRYPTO 2011-06-27 15:09:39 -04:00
Makefile Bluetooth: Implement the first SMP commands 2011-06-13 15:11:55 -03:00
af_bluetooth.c Bluetooth: Handle fragmented skbs in bt_sock_stream_recvmsg() 2011-09-27 18:16:07 -03:00
hci_conn.c Bluetooth: use recommended LE connection parameters 2011-09-27 18:16:27 -03:00
hci_core.c Bluetooth: Add mgmt events for blacklisting 2011-09-21 12:59:15 -03:00
hci_event.c Bluetooth: hci_le_adv_report_evt code refactoring 2011-09-29 15:25:08 -03:00
hci_sock.c Bluetooth: Add mgmt events for blacklisting 2011-09-21 12:59:15 -03:00
hci_sysfs.c Bluetooth: Add LE link type for debugfs output 2011-09-21 12:58:12 -03:00
l2cap_core.c Bluetooth: EFS: add enable_hs kernel param 2011-10-06 14:40:16 -03:00
l2cap_sock.c Bluetooth: Fixed wrong L2CAP Sock timer value 2011-08-11 19:50:27 -03:00
lib.c Bluetooth: Add bt_printk 2011-06-30 19:17:12 -03:00
mgmt.c Bluetooth: Check 'dev_class' in mgmt_device_found() 2011-09-21 12:59:16 -03:00
sco.c Bluetooth: sco: Fix lost wakeups waiting to accept socket 2011-08-11 19:50:26 -03:00
smp.c Bluetooth: Remove support for other SMP keys than the LTK 2011-09-21 12:59:16 -03:00