<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/bluetooth, branch v3.7.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/bluetooth?h=v3.7.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/bluetooth?h=v3.7.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-01-11T17:19:04Z</updated>
<entry>
<title>Revert "Bluetooth: Fix possible deadlock in SCO code"</title>
<updated>2013-01-11T17:19:04Z</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.co.uk</email>
</author>
<published>2012-12-03T17:36:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3d8c1e480a910cf0940f7b375875b567a5a9a771'/>
<id>urn:sha1:3d8c1e480a910cf0940f7b375875b567a5a9a771</id>
<content type='text'>
commit 0b27a4b97cb1874503c78453c0903df53c0c86b2 upstream.

This reverts commit 269c4845d5b3627b95b1934107251bacbe99bb68.

The commit was causing dead locks and NULL dereferences in the sco code:

 [28084.104013] BUG: soft lockup - CPU#0 stuck for 22s! [kworker/u:0H:7]
 [28084.104021] Modules linked in: btusb bluetooth &lt;snip [last unloaded:
bluetooth]
...
 [28084.104021]  [&lt;c160246d&gt;] _raw_spin_lock+0xd/0x10
 [28084.104021]  [&lt;f920e708&gt;] sco_conn_del+0x58/0x1b0 [bluetooth]
 [28084.104021]  [&lt;f920f1a9&gt;] sco_connect_cfm+0xb9/0x2b0 [bluetooth]
 [28084.104021]  [&lt;f91ef289&gt;]
hci_sync_conn_complete_evt.isra.94+0x1c9/0x260 [bluetooth]
 [28084.104021]  [&lt;f91f1a8d&gt;] hci_event_packet+0x74d/0x2b40 [bluetooth]
 [28084.104021]  [&lt;c1501abd&gt;] ? __kfree_skb+0x3d/0x90
 [28084.104021]  [&lt;c1501b46&gt;] ? kfree_skb+0x36/0x90
 [28084.104021]  [&lt;f91fcb4e&gt;] ? hci_send_to_monitor+0x10e/0x190 [bluetooth]
 [28084.104021]  [&lt;f91fcb4e&gt;] ? hci_send_to_monitor+0x10e/0x190 [bluetooth]

Reported-by: Chan-yeol Park &lt;chanyeol.park@gmail.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Bluetooth: cancel power_on work when unregistering the device</title>
<updated>2013-01-11T17:19:03Z</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.co.uk</email>
</author>
<published>2012-11-21T02:50:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c7cf062d05129d6d75dabfcb96f5c5a4a92d824c'/>
<id>urn:sha1:c7cf062d05129d6d75dabfcb96f5c5a4a92d824c</id>
<content type='text'>
commit b9b5ef188e5a2222cfc16ef62a4703080750b451 upstream.

We need to cancel the hci_power_on work in order to avoid it run when we
try to free the hdev.

[ 1434.201149] ------------[ cut here ]------------
[ 1434.204998] WARNING: at lib/debugobjects.c:261 debug_print_object+0x8e/0xb0()
[ 1434.208324] ODEBUG: free active (active state 0) object type: work_struct hint: hci
_power_on+0x0/0x90
[ 1434.210386] Pid: 8564, comm: trinity-child25 Tainted: G        W    3.7.0-rc5-next-
20121112-sasha-00018-g2f4ce0e #127
[ 1434.210760] Call Trace:
[ 1434.210760]  [&lt;ffffffff819f3d6e&gt;] ? debug_print_object+0x8e/0xb0
[ 1434.210760]  [&lt;ffffffff8110b887&gt;] warn_slowpath_common+0x87/0xb0
[ 1434.210760]  [&lt;ffffffff8110b911&gt;] warn_slowpath_fmt+0x41/0x50
[ 1434.210760]  [&lt;ffffffff819f3d6e&gt;] debug_print_object+0x8e/0xb0
[ 1434.210760]  [&lt;ffffffff8376b750&gt;] ? hci_dev_open+0x310/0x310
[ 1434.210760]  [&lt;ffffffff83bf94e5&gt;] ? _raw_spin_unlock_irqrestore+0x55/0xa0
[ 1434.210760]  [&lt;ffffffff819f3ee5&gt;] __debug_check_no_obj_freed+0xa5/0x230
[ 1434.210760]  [&lt;ffffffff83785db0&gt;] ? bt_host_release+0x10/0x20
[ 1434.210760]  [&lt;ffffffff819f4d15&gt;] debug_check_no_obj_freed+0x15/0x20
[ 1434.210760]  [&lt;ffffffff8125eee7&gt;] kfree+0x227/0x330
[ 1434.210760]  [&lt;ffffffff83785db0&gt;] bt_host_release+0x10/0x20
[ 1434.210760]  [&lt;ffffffff81e539e5&gt;] device_release+0x65/0xc0
[ 1434.210760]  [&lt;ffffffff819d3975&gt;] kobject_cleanup+0x145/0x190
[ 1434.210760]  [&lt;ffffffff819d39cd&gt;] kobject_release+0xd/0x10
[ 1434.210760]  [&lt;ffffffff819d33cc&gt;] kobject_put+0x4c/0x60
[ 1434.210760]  [&lt;ffffffff81e548b2&gt;] put_device+0x12/0x20
[ 1434.210760]  [&lt;ffffffff8376a334&gt;] hci_free_dev+0x24/0x30
[ 1434.210760]  [&lt;ffffffff82fd8fe1&gt;] vhci_release+0x31/0x60
[ 1434.210760]  [&lt;ffffffff8127be12&gt;] __fput+0x122/0x250
[ 1434.210760]  [&lt;ffffffff811cab0d&gt;] ? rcu_user_exit+0x9d/0xd0
[ 1434.210760]  [&lt;ffffffff8127bf49&gt;] ____fput+0x9/0x10
[ 1434.210760]  [&lt;ffffffff81133402&gt;] task_work_run+0xb2/0xf0
[ 1434.210760]  [&lt;ffffffff8106cfa7&gt;] do_notify_resume+0x77/0xa0
[ 1434.210760]  [&lt;ffffffff83bfb0ea&gt;] int_signal+0x12/0x17
[ 1434.210760] ---[ end trace a6d57fefbc8a8cc7 ]---

Reported-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Bluetooth: Add missing lock nesting notation</title>
<updated>2013-01-11T17:19:03Z</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.co.uk</email>
</author>
<published>2012-11-21T01:25:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5795b170bfde23d424fb15d2c945d5dfb827e063'/>
<id>urn:sha1:5795b170bfde23d424fb15d2c945d5dfb827e063</id>
<content type='text'>
commit dc2a0e20fbc85a71c63aa4330b496fda33f6bf80 upstream.

This patch fixes the following report, it happens when accepting rfcomm
connections:

[  228.165378] =============================================
[  228.165378] [ INFO: possible recursive locking detected ]
[  228.165378] 3.7.0-rc1-00536-gc1d5dc4 #120 Tainted: G        W
[  228.165378] ---------------------------------------------
[  228.165378] bluetoothd/1341 is trying to acquire lock:
[  228.165378]  (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+...}, at:
[&lt;ffffffffa0000aa0&gt;] bt_accept_dequeue+0xa0/0x180 [bluetooth]
[  228.165378]
[  228.165378] but task is already holding lock:
[  228.165378]  (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+...}, at:
[&lt;ffffffffa0205118&gt;] rfcomm_sock_accept+0x58/0x2d0 [rfcomm]
[  228.165378]
[  228.165378] other info that might help us debug this:
[  228.165378]  Possible unsafe locking scenario:
[  228.165378]
[  228.165378]        CPU0
[  228.165378]        ----
[  228.165378]   lock(sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM);
[  228.165378]   lock(sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM);
[  228.165378]
[  228.165378]  *** DEADLOCK ***
[  228.165378]
[  228.165378]  May be due to missing lock nesting notation

Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Bluetooth: Fix memory leak when removing a UUID</title>
<updated>2012-11-09T15:45:37Z</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2012-11-08T09:25:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=482049f75750d73358e65236b933417b69f9cc25'/>
<id>urn:sha1:482049f75750d73358e65236b933417b69f9cc25</id>
<content type='text'>
When removing a UUID from the list in the remove_uuid() function we must
also kfree the entry in addition to removing it from the list.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Notify about device registration before power on</title>
<updated>2012-11-09T15:45:37Z</updated>
<author>
<name>Marcel Holtmann</name>
<email>marcel@holtmann.org</email>
</author>
<published>2012-10-30T08:35:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fbe96d6ff9f4e361e1b2ec0a30140e17af7e3854'/>
<id>urn:sha1:fbe96d6ff9f4e361e1b2ec0a30140e17af7e3854</id>
<content type='text'>
It is important that the monitor interface gets notified about
a new device before its power on procedure has been started.

For some reason that is no longer working as expected and the power
on procedure runs first. It is safe to just notify about device
registration and trigger the power on procedure afterwards.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Acked-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix error status when pairing fails</title>
<updated>2012-11-09T15:45:37Z</updated>
<author>
<name>Paulo Sérgio</name>
<email>paulo.sergio@openbossa.org</email>
</author>
<published>2012-10-25T19:55:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=896ea28ea824d49671fc7e9315d9c5be491a644f'/>
<id>urn:sha1:896ea28ea824d49671fc7e9315d9c5be491a644f</id>
<content type='text'>
When pairing fails due to wrong confirm value, the management layer
doesn't report a proper error status. It sends
MGMT_STATUS_CONNECT_FAILED instead of MGMT_STATUS_AUTH_FAILED.

Most of management functions that receive a status as a parameter
expects for it to be encoded as a HCI status. But when a SMP pairing
fails, the SMP layer sends the SMP reason as the error status to the
management layer.

This commit maps all SMP reasons to HCI_ERROR_AUTH_FAILURE, which will
be converted to MGMT_STATUS_AUTH_FAILED in the management layer.

Reported-by: Claudio Takahasi &lt;claudio.takahasi@openbossa.org&gt;
Reviewed-by: João Paulo Rechi Vita &lt;jprvita@openbossa.org&gt;
Signed-off-by: Paulo Sérgio &lt;paulo.sergio@openbossa.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix having bogus entries in mgmt_read_index_list reply</title>
<updated>2012-11-09T15:45:37Z</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2012-10-19T17:10:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=476e44cb19f1fbf2d5883dddcc0ce31b33b45915'/>
<id>urn:sha1:476e44cb19f1fbf2d5883dddcc0ce31b33b45915</id>
<content type='text'>
The mgmt_read_index_list uses one loop to calculate the max needed size
of its response with the help of an upper-bound of the controller count.
The second loop is more strict as it checks for HCI_SETUP (which might
have gotten set after the first loop) and could result in some indexes
being skipped. Because of this the function needs to readjust the event
length and index count after filling in the response array.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Cc: stable@vger.kernel.org
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth</title>
<updated>2012-10-15T18:34:23Z</updated>
<author>
<name>John W. Linville</name>
<email>linville@tuxdriver.com</email>
</author>
<published>2012-10-15T18:34:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3d02a9265c5414b07b372dde616174d3c89071a0'/>
<id>urn:sha1:3d02a9265c5414b07b372dde616174d3c89071a0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>userns: Properly print bluetooth socket uids</title>
<updated>2012-10-12T20:16:47Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-10-04T03:32:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1bbb3095a5912be4b9c90397ef2182a5a328865b'/>
<id>urn:sha1:1bbb3095a5912be4b9c90397ef2182a5a328865b</id>
<content type='text'>
With user namespace support enabled building bluetooth generated the warning.
net/bluetooth/af_bluetooth.c: In function ‘bt_seq_show’:
net/bluetooth/af_bluetooth.c:598:7: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘kuid_t’ [-Wformat]

Convert sock_i_uid from a kuid_t to a uid_t before printing, to avoid
this problem.

Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Cc: Masatake YAMATO &lt;yamato@redhat.com&gt;
Cc: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: SMP: Fix setting unknown auth_req bits</title>
<updated>2012-10-12T09:55:20Z</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2012-10-11T14:26:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=065a13e2cc665f6547dc7e8a9d6b6565badf940a'/>
<id>urn:sha1:065a13e2cc665f6547dc7e8a9d6b6565badf940a</id>
<content type='text'>
When sending a pairing request or response we should not just blindly
copy the value that the remote device sent. Instead we should at least
make sure to mask out any unknown bits. This is particularly critical
from the upcoming LE Secure Connections feature perspective as
incorrectly indicating support for it (by copying the remote value)
would cause a failure to pair with devices that support it.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Cc: stable@kernel.org
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
</feed>
