Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6:
Bluetooth: Don't trigger disconnect timeout for security mode 3 pairing
Bluetooth: Don't use hci_acl_connect_cancel() for incoming connections
Bluetooth: Fix wrong module refcount when connection setup fails

Another case of me handling the fallout from Davem's unfortunate
addiction to shuffleboard.

Won't anybody think of the children? Join the anti-shuffleboard league
today!

+7 -4
+3 -3
net/bluetooth/hci_conn.c
··· 171 171 switch (conn->state) { 172 172 case BT_CONNECT: 173 173 case BT_CONNECT2: 174 - if (conn->type == ACL_LINK) 174 + if (conn->type == ACL_LINK && conn->out) 175 175 hci_acl_connect_cancel(conn); 176 - else 177 - hci_acl_disconn(conn, 0x13); 178 176 break; 179 177 case BT_CONFIG: 180 178 case BT_CONNECTED: ··· 289 291 skb_queue_purge(&conn->data_q); 290 292 291 293 hci_conn_del_sysfs(conn); 294 + 295 + hci_dev_put(hdev); 292 296 293 297 return 0; 294 298 }
+1 -1
net/bluetooth/hci_event.c
··· 1493 1493 hci_dev_lock(hdev); 1494 1494 1495 1495 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); 1496 - if (conn) { 1496 + if (conn && conn->state == BT_CONNECTED) { 1497 1497 hci_conn_hold(conn); 1498 1498 conn->disc_timeout = HCI_PAIRING_TIMEOUT; 1499 1499 hci_conn_put(conn);
+3
net/bluetooth/hci_sysfs.c
··· 99 99 BT_ERR("Failed to register connection device"); 100 100 return; 101 101 } 102 + 103 + hci_dev_hold(hdev); 102 104 } 103 105 104 106 /* ··· 136 134 137 135 device_del(&conn->dev); 138 136 put_device(&conn->dev); 137 + 139 138 hci_dev_put(hdev); 140 139 } 141 140