<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/net/bluetooth, branch v3.4.26</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>Bluetooth: cancel power_on work when unregistering the device</title>
<updated>2013-01-11T17:07:17+00:00</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.co.uk</email>
</author>
<published>2012-11-21T02:50:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1a0da46b46bc9b27414fcb1f1ad6f0eeee311f5e'/>
<id>1a0da46b46bc9b27414fcb1f1ad6f0eeee311f5e</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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;

</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Add missing lock nesting notation</title>
<updated>2013-01-11T17:07:17+00:00</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.co.uk</email>
</author>
<published>2012-11-21T01:25:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7e2741804be03faf0eaba1df228e2ba5c07ecdd7'/>
<id>7e2741804be03faf0eaba1df228e2ba5c07ecdd7</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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;

</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix using uninitialized option in RFCMode</title>
<updated>2012-12-03T19:46:36+00:00</updated>
<author>
<name>Szymon Janc</name>
<email>szymon.janc@tieto.com</email>
</author>
<published>2012-06-08T09:33:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2214cc8d585df2bbfc894d0a3acc5a629fa1a985'/>
<id>2214cc8d585df2bbfc894d0a3acc5a629fa1a985</id>
<content type='text'>
commit 8f321f853ea33330c7141977cd34804476e2e07e upstream.

If remote device sends bogus RFC option with invalid length,
undefined options values are used. Fix this by using defaults when
remote misbehaves.

This also fixes the following warning reported by gcc 4.7.0:

net/bluetooth/l2cap_core.c: In function 'l2cap_config_rsp':
net/bluetooth/l2cap_core.c:3302:13: warning: 'rfc.max_pdu_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.max_pdu_size' was declared here
net/bluetooth/l2cap_core.c:3298:25: warning: 'rfc.monitor_timeout' may be used uninitialized in this function [-Wmaybe-uninitialized]
net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.monitor_timeout' was declared here
net/bluetooth/l2cap_core.c:3297:25: warning: 'rfc.retrans_timeout' may be used uninitialized in this function [-Wmaybe-uninitialized]
net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.retrans_timeout' was declared here
net/bluetooth/l2cap_core.c:3295:2: warning: 'rfc.mode' may be used uninitialized in this function [-Wmaybe-uninitialized]
net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.mode' was declared here

Signed-off-by: Szymon Janc &lt;szymon.janc@tieto.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 8f321f853ea33330c7141977cd34804476e2e07e upstream.

If remote device sends bogus RFC option with invalid length,
undefined options values are used. Fix this by using defaults when
remote misbehaves.

This also fixes the following warning reported by gcc 4.7.0:

net/bluetooth/l2cap_core.c: In function 'l2cap_config_rsp':
net/bluetooth/l2cap_core.c:3302:13: warning: 'rfc.max_pdu_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.max_pdu_size' was declared here
net/bluetooth/l2cap_core.c:3298:25: warning: 'rfc.monitor_timeout' may be used uninitialized in this function [-Wmaybe-uninitialized]
net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.monitor_timeout' was declared here
net/bluetooth/l2cap_core.c:3297:25: warning: 'rfc.retrans_timeout' may be used uninitialized in this function [-Wmaybe-uninitialized]
net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.retrans_timeout' was declared here
net/bluetooth/l2cap_core.c:3295:2: warning: 'rfc.mode' may be used uninitialized in this function [-Wmaybe-uninitialized]
net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.mode' was declared here

Signed-off-by: Szymon Janc &lt;szymon.janc@tieto.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;

</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: SMP: Fix setting unknown auth_req bits</title>
<updated>2012-10-31T17:03:02+00:00</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2012-10-11T14:26:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0fb0773f2da4ffa566e0c813dc295c44208debb5'/>
<id>0fb0773f2da4ffa566e0c813dc295c44208debb5</id>
<content type='text'>
commit 065a13e2cc665f6547dc7e8a9d6b6565badf940a upstream.

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;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 065a13e2cc665f6547dc7e8a9d6b6565badf940a upstream.

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;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix sending a HCI Authorization Request over LE links</title>
<updated>2012-10-02T17:30:34+00:00</updated>
<author>
<name>Vinicius Costa Gomes</name>
<email>vinicius.gomes@openbossa.org</email>
</author>
<published>2012-08-24T00:32:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c031edca540afb66764db24eed10eb149ac6c852'/>
<id>c031edca540afb66764db24eed10eb149ac6c852</id>
<content type='text'>
commit d8343f125710fb596f7a88cd756679f14f4e77b9 upstream.

In the case that the link is already in the connected state and a
Pairing request arrives from the mgmt interface, hci_conn_security()
would be called but it was not considering LE links.

Reported-by: João Paulo Rechi Vita &lt;jprvita@openbossa.org&gt;
Signed-off-by: Vinicius Costa Gomes &lt;vinicius.gomes@openbossa.org&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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit d8343f125710fb596f7a88cd756679f14f4e77b9 upstream.

In the case that the link is already in the connected state and a
Pairing request arrives from the mgmt interface, hci_conn_security()
would be called but it was not considering LE links.

Reported-by: João Paulo Rechi Vita &lt;jprvita@openbossa.org&gt;
Signed-off-by: Vinicius Costa Gomes &lt;vinicius.gomes@openbossa.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Change signature of smp_conn_security()</title>
<updated>2012-10-02T17:30:34+00:00</updated>
<author>
<name>Vinicius Costa Gomes</name>
<email>vinicius.gomes@openbossa.org</email>
</author>
<published>2012-08-24T00:32:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0fcc0805df9cf7483e927cf6a4dc94938318c06a'/>
<id>0fcc0805df9cf7483e927cf6a4dc94938318c06a</id>
<content type='text'>
commit cc110922da7e902b62d18641a370fec01a9fa794 upstream.

To make it clear that it may be called from contexts that may not have
any knowledge of L2CAP, we change the connection parameter, to receive
a hci_conn.

This also makes it clear that it is checking the security of the link.

Signed-off-by: Vinicius Costa Gomes &lt;vinicius.gomes@openbossa.org&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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit cc110922da7e902b62d18641a370fec01a9fa794 upstream.

To make it clear that it may be called from contexts that may not have
any knowledge of L2CAP, we change the connection parameter, to receive
a hci_conn.

This also makes it clear that it is checking the security of the link.

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

</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix use-after-free bug in SMP</title>
<updated>2012-10-02T17:30:34+00:00</updated>
<author>
<name>Andre Guedes</name>
<email>andre.guedes@openbossa.org</email>
</author>
<published>2012-08-01T23:34:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=27d50469825fd267f44e13fb0627b011c0da6abd'/>
<id>27d50469825fd267f44e13fb0627b011c0da6abd</id>
<content type='text'>
commit 61a0cfb008f57ecf7eb28ee762952fb42dc15d15 upstream.

If SMP fails, we should always cancel security_timer delayed work.
Otherwise, security_timer function may run after l2cap_conn object
has been freed.

This patch fixes the following warning reported by ODEBUG:

WARNING: at lib/debugobjects.c:261 debug_print_object+0x7c/0x8d()
Hardware name: Bochs
ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x27
Modules linked in: btusb bluetooth
Pid: 440, comm: kworker/u:2 Not tainted 3.5.0-rc1+ #4
Call Trace:
 [&lt;ffffffff81174600&gt;] ? free_obj_work+0x4a/0x7f
 [&lt;ffffffff81023eb8&gt;] warn_slowpath_common+0x7e/0x97
 [&lt;ffffffff81023f65&gt;] warn_slowpath_fmt+0x41/0x43
 [&lt;ffffffff811746b1&gt;] debug_print_object+0x7c/0x8d
 [&lt;ffffffff810394f0&gt;] ? __queue_work+0x241/0x241
 [&lt;ffffffff81174fdd&gt;] debug_check_no_obj_freed+0x92/0x159
 [&lt;ffffffff810ac08e&gt;] slab_free_hook+0x6f/0x77
 [&lt;ffffffffa0019145&gt;] ? l2cap_conn_del+0x148/0x157 [bluetooth]
 [&lt;ffffffff810ae408&gt;] kfree+0x59/0xac
 [&lt;ffffffffa0019145&gt;] l2cap_conn_del+0x148/0x157 [bluetooth]
 [&lt;ffffffffa001b9a2&gt;] l2cap_recv_frame+0xa77/0xfa4 [bluetooth]
 [&lt;ffffffff810592f9&gt;] ? trace_hardirqs_on_caller+0x112/0x1ad
 [&lt;ffffffffa001c86c&gt;] l2cap_recv_acldata+0xe2/0x264 [bluetooth]
 [&lt;ffffffffa0002b2f&gt;] hci_rx_work+0x235/0x33c [bluetooth]
 [&lt;ffffffff81038dc3&gt;] ? process_one_work+0x126/0x2fe
 [&lt;ffffffff81038e22&gt;] process_one_work+0x185/0x2fe
 [&lt;ffffffff81038dc3&gt;] ? process_one_work+0x126/0x2fe
 [&lt;ffffffff81059f2e&gt;] ? lock_acquired+0x1b5/0x1cf
 [&lt;ffffffffa00028fa&gt;] ? le_scan_work+0x11d/0x11d [bluetooth]
 [&lt;ffffffff81036fb6&gt;] ? spin_lock_irq+0x9/0xb
 [&lt;ffffffff81039209&gt;] worker_thread+0xcf/0x175
 [&lt;ffffffff8103913a&gt;] ? rescuer_thread+0x175/0x175
 [&lt;ffffffff8103cfe0&gt;] kthread+0x95/0x9d
 [&lt;ffffffff812c5054&gt;] kernel_threadi_helper+0x4/0x10
 [&lt;ffffffff812c36b0&gt;] ? retint_restore_args+0x13/0x13
 [&lt;ffffffff8103cf4b&gt;] ? flush_kthread_worker+0xdb/0xdb
 [&lt;ffffffff812c5050&gt;] ? gs_change+0x13/0x13

This bug can be reproduced using hctool lecc or l2test tools and
bluetoothd not running.

Signed-off-by: Andre Guedes &lt;andre.guedes@openbossa.org&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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 61a0cfb008f57ecf7eb28ee762952fb42dc15d15 upstream.

If SMP fails, we should always cancel security_timer delayed work.
Otherwise, security_timer function may run after l2cap_conn object
has been freed.

This patch fixes the following warning reported by ODEBUG:

WARNING: at lib/debugobjects.c:261 debug_print_object+0x7c/0x8d()
Hardware name: Bochs
ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x27
Modules linked in: btusb bluetooth
Pid: 440, comm: kworker/u:2 Not tainted 3.5.0-rc1+ #4
Call Trace:
 [&lt;ffffffff81174600&gt;] ? free_obj_work+0x4a/0x7f
 [&lt;ffffffff81023eb8&gt;] warn_slowpath_common+0x7e/0x97
 [&lt;ffffffff81023f65&gt;] warn_slowpath_fmt+0x41/0x43
 [&lt;ffffffff811746b1&gt;] debug_print_object+0x7c/0x8d
 [&lt;ffffffff810394f0&gt;] ? __queue_work+0x241/0x241
 [&lt;ffffffff81174fdd&gt;] debug_check_no_obj_freed+0x92/0x159
 [&lt;ffffffff810ac08e&gt;] slab_free_hook+0x6f/0x77
 [&lt;ffffffffa0019145&gt;] ? l2cap_conn_del+0x148/0x157 [bluetooth]
 [&lt;ffffffff810ae408&gt;] kfree+0x59/0xac
 [&lt;ffffffffa0019145&gt;] l2cap_conn_del+0x148/0x157 [bluetooth]
 [&lt;ffffffffa001b9a2&gt;] l2cap_recv_frame+0xa77/0xfa4 [bluetooth]
 [&lt;ffffffff810592f9&gt;] ? trace_hardirqs_on_caller+0x112/0x1ad
 [&lt;ffffffffa001c86c&gt;] l2cap_recv_acldata+0xe2/0x264 [bluetooth]
 [&lt;ffffffffa0002b2f&gt;] hci_rx_work+0x235/0x33c [bluetooth]
 [&lt;ffffffff81038dc3&gt;] ? process_one_work+0x126/0x2fe
 [&lt;ffffffff81038e22&gt;] process_one_work+0x185/0x2fe
 [&lt;ffffffff81038dc3&gt;] ? process_one_work+0x126/0x2fe
 [&lt;ffffffff81059f2e&gt;] ? lock_acquired+0x1b5/0x1cf
 [&lt;ffffffffa00028fa&gt;] ? le_scan_work+0x11d/0x11d [bluetooth]
 [&lt;ffffffff81036fb6&gt;] ? spin_lock_irq+0x9/0xb
 [&lt;ffffffff81039209&gt;] worker_thread+0xcf/0x175
 [&lt;ffffffff8103913a&gt;] ? rescuer_thread+0x175/0x175
 [&lt;ffffffff8103cfe0&gt;] kthread+0x95/0x9d
 [&lt;ffffffff812c5054&gt;] kernel_threadi_helper+0x4/0x10
 [&lt;ffffffff812c36b0&gt;] ? retint_restore_args+0x13/0x13
 [&lt;ffffffff8103cf4b&gt;] ? flush_kthread_worker+0xdb/0xdb
 [&lt;ffffffff812c5050&gt;] ? gs_change+0x13/0x13

This bug can be reproduced using hctool lecc or l2test tools and
bluetoothd not running.

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

</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: mgmt: Fix enabling LE while powered off</title>
<updated>2012-10-02T17:30:08+00:00</updated>
<author>
<name>Andrzej Kaczmarek</name>
<email>andrzej.kaczmarek@tieto.com</email>
</author>
<published>2012-08-29T08:02:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a6be20b8cd1e5e847c4191b8f249b939aaabf987'/>
<id>a6be20b8cd1e5e847c4191b8f249b939aaabf987</id>
<content type='text'>
commit 562fcc246ebe31ade6e1be08585673b9b2785498 upstream.

When new BT USB adapter is plugged in it's configured while still being powered
off (HCI_AUTO_OFF flag is set), thus Set LE will only set dev_flags but won't
write changes to controller. As a result it's not possible to start device
discovery session on LE controller as it uses interleaved discovery which
requires LE Supported Host flag in extended features.

This patch ensures HCI Write LE Host Supported is sent when Set Powered is
called to power on controller and clear HCI_AUTO_OFF flag.

Signed-off-by: Andrzej Kaczmarek &lt;andrzej.kaczmarek@tieto.com&gt;
Acked-by: Johan Hedberg &lt;johan.hedberg@intel.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 562fcc246ebe31ade6e1be08585673b9b2785498 upstream.

When new BT USB adapter is plugged in it's configured while still being powered
off (HCI_AUTO_OFF flag is set), thus Set LE will only set dev_flags but won't
write changes to controller. As a result it's not possible to start device
discovery session on LE controller as it uses interleaved discovery which
requires LE Supported Host flag in extended features.

This patch ensures HCI Write LE Host Supported is sent when Set Powered is
called to power on controller and clear HCI_AUTO_OFF flag.

Signed-off-by: Andrzej Kaczmarek &lt;andrzej.kaczmarek@tieto.com&gt;
Acked-by: Johan Hedberg &lt;johan.hedberg@intel.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;

</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix not removing power_off delayed work</title>
<updated>2012-10-02T17:30:08+00:00</updated>
<author>
<name>Vinicius Costa Gomes</name>
<email>vinicius.gomes@openbossa.org</email>
</author>
<published>2012-09-14T19:34:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ec4d417c66a406bb464598220faf9f561d5b6d25'/>
<id>ec4d417c66a406bb464598220faf9f561d5b6d25</id>
<content type='text'>
commit 78c04c0bf52360dc2f7185e99c8e9aa05d73ae5a upstream.

For example, when a usb reset is received (I could reproduce it
running something very similar to this[1] in a loop) it could be
that the device is unregistered while the power_off delayed work
is still scheduled to run.

Backtrace:

WARNING: at lib/debugobjects.c:261 debug_print_object+0x7c/0x8d()
Hardware name: To Be Filled By O.E.M.
ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x26
Modules linked in: nouveau mxm_wmi btusb wmi bluetooth ttm coretemp drm_kms_helper
Pid: 2114, comm: usb-reset Not tainted 3.5.0bt-next #2
Call Trace:
 [&lt;ffffffff8124cc00&gt;] ? free_obj_work+0x57/0x91
 [&lt;ffffffff81058f88&gt;] warn_slowpath_common+0x7e/0x97
 [&lt;ffffffff81059035&gt;] warn_slowpath_fmt+0x41/0x43
 [&lt;ffffffff8124ccb6&gt;] debug_print_object+0x7c/0x8d
 [&lt;ffffffff8106e3ec&gt;] ? __queue_work+0x259/0x259
 [&lt;ffffffff8124d63e&gt;] ? debug_check_no_obj_freed+0x6f/0x1b5
 [&lt;ffffffff8124d667&gt;] debug_check_no_obj_freed+0x98/0x1b5
 [&lt;ffffffffa00aa031&gt;] ? bt_host_release+0x10/0x1e [bluetooth]
 [&lt;ffffffff810fc035&gt;] kfree+0x90/0xe6
 [&lt;ffffffffa00aa031&gt;] bt_host_release+0x10/0x1e [bluetooth]
 [&lt;ffffffff812ec2f9&gt;] device_release+0x4a/0x7e
 [&lt;ffffffff8123ef57&gt;] kobject_release+0x11d/0x154
 [&lt;ffffffff8123ed98&gt;] kobject_put+0x4a/0x4f
 [&lt;ffffffff812ec0d9&gt;] put_device+0x12/0x14
 [&lt;ffffffffa009472b&gt;] hci_free_dev+0x22/0x26 [bluetooth]
 [&lt;ffffffffa0280dd0&gt;] btusb_disconnect+0x96/0x9f [btusb]
 [&lt;ffffffff813581b4&gt;] usb_unbind_interface+0x57/0x106
 [&lt;ffffffff812ef988&gt;] __device_release_driver+0x83/0xd6
 [&lt;ffffffff812ef9fb&gt;] device_release_driver+0x20/0x2d
 [&lt;ffffffff813582a7&gt;] usb_driver_release_interface+0x44/0x7b
 [&lt;ffffffff81358795&gt;] usb_forced_unbind_intf+0x45/0x4e
 [&lt;ffffffff8134f959&gt;] usb_reset_device+0xa6/0x12e
 [&lt;ffffffff8135df86&gt;] usbdev_do_ioctl+0x319/0xe20
 [&lt;ffffffff81203244&gt;] ? avc_has_perm_flags+0xc9/0x12e
 [&lt;ffffffff812031a0&gt;] ? avc_has_perm_flags+0x25/0x12e
 [&lt;ffffffff81050101&gt;] ? do_page_fault+0x31e/0x3a1
 [&lt;ffffffff8135eaa6&gt;] usbdev_ioctl+0x9/0xd
 [&lt;ffffffff811126b1&gt;] vfs_ioctl+0x21/0x34
 [&lt;ffffffff81112f7b&gt;] do_vfs_ioctl+0x408/0x44b
 [&lt;ffffffff81208d45&gt;] ? file_has_perm+0x76/0x81
 [&lt;ffffffff8111300f&gt;] sys_ioctl+0x51/0x76
 [&lt;ffffffff8158db22&gt;] system_call_fastpath+0x16/0x1b

[1] http://cpansearch.perl.org/src/DPAVLIN/Biblio-RFID-0.03/examples/usbreset.c

Signed-off-by: Vinicius Costa Gomes &lt;vinicius.gomes@openbossa.org&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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 78c04c0bf52360dc2f7185e99c8e9aa05d73ae5a upstream.

For example, when a usb reset is received (I could reproduce it
running something very similar to this[1] in a loop) it could be
that the device is unregistered while the power_off delayed work
is still scheduled to run.

Backtrace:

WARNING: at lib/debugobjects.c:261 debug_print_object+0x7c/0x8d()
Hardware name: To Be Filled By O.E.M.
ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x26
Modules linked in: nouveau mxm_wmi btusb wmi bluetooth ttm coretemp drm_kms_helper
Pid: 2114, comm: usb-reset Not tainted 3.5.0bt-next #2
Call Trace:
 [&lt;ffffffff8124cc00&gt;] ? free_obj_work+0x57/0x91
 [&lt;ffffffff81058f88&gt;] warn_slowpath_common+0x7e/0x97
 [&lt;ffffffff81059035&gt;] warn_slowpath_fmt+0x41/0x43
 [&lt;ffffffff8124ccb6&gt;] debug_print_object+0x7c/0x8d
 [&lt;ffffffff8106e3ec&gt;] ? __queue_work+0x259/0x259
 [&lt;ffffffff8124d63e&gt;] ? debug_check_no_obj_freed+0x6f/0x1b5
 [&lt;ffffffff8124d667&gt;] debug_check_no_obj_freed+0x98/0x1b5
 [&lt;ffffffffa00aa031&gt;] ? bt_host_release+0x10/0x1e [bluetooth]
 [&lt;ffffffff810fc035&gt;] kfree+0x90/0xe6
 [&lt;ffffffffa00aa031&gt;] bt_host_release+0x10/0x1e [bluetooth]
 [&lt;ffffffff812ec2f9&gt;] device_release+0x4a/0x7e
 [&lt;ffffffff8123ef57&gt;] kobject_release+0x11d/0x154
 [&lt;ffffffff8123ed98&gt;] kobject_put+0x4a/0x4f
 [&lt;ffffffff812ec0d9&gt;] put_device+0x12/0x14
 [&lt;ffffffffa009472b&gt;] hci_free_dev+0x22/0x26 [bluetooth]
 [&lt;ffffffffa0280dd0&gt;] btusb_disconnect+0x96/0x9f [btusb]
 [&lt;ffffffff813581b4&gt;] usb_unbind_interface+0x57/0x106
 [&lt;ffffffff812ef988&gt;] __device_release_driver+0x83/0xd6
 [&lt;ffffffff812ef9fb&gt;] device_release_driver+0x20/0x2d
 [&lt;ffffffff813582a7&gt;] usb_driver_release_interface+0x44/0x7b
 [&lt;ffffffff81358795&gt;] usb_forced_unbind_intf+0x45/0x4e
 [&lt;ffffffff8134f959&gt;] usb_reset_device+0xa6/0x12e
 [&lt;ffffffff8135df86&gt;] usbdev_do_ioctl+0x319/0xe20
 [&lt;ffffffff81203244&gt;] ? avc_has_perm_flags+0xc9/0x12e
 [&lt;ffffffff812031a0&gt;] ? avc_has_perm_flags+0x25/0x12e
 [&lt;ffffffff81050101&gt;] ? do_page_fault+0x31e/0x3a1
 [&lt;ffffffff8135eaa6&gt;] usbdev_ioctl+0x9/0xd
 [&lt;ffffffff811126b1&gt;] vfs_ioctl+0x21/0x34
 [&lt;ffffffff81112f7b&gt;] do_vfs_ioctl+0x408/0x44b
 [&lt;ffffffff81208d45&gt;] ? file_has_perm+0x76/0x81
 [&lt;ffffffff8111300f&gt;] sys_ioctl+0x51/0x76
 [&lt;ffffffff8158db22&gt;] system_call_fastpath+0x16/0x1b

[1] http://cpansearch.perl.org/src/DPAVLIN/Biblio-RFID-0.03/examples/usbreset.c

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

</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: mgmt: Fix enabling SSP while powered off</title>
<updated>2012-10-02T17:30:08+00:00</updated>
<author>
<name>Andrzej Kaczmarek</name>
<email>andrzej.kaczmarek@tieto.com</email>
</author>
<published>2012-08-29T08:02:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=dcc8dbc21ff2052c0df6dee3e1a36c3ef4f1133c'/>
<id>dcc8dbc21ff2052c0df6dee3e1a36c3ef4f1133c</id>
<content type='text'>
commit 3d1cbdd6aefff711bcf389fdabc4af9bc22e8201 upstream.

When new BT USB adapter is plugged in it's configured while still being powered
off (HCI_AUTO_OFF flag is set), thus Set SSP will only set dev_flags but won't
write changes to controller. As a result remote devices won't use Secure Simple
Pairing with our device due to SSP Host Support flag disabled in extended
features and may also reject SSP attempt from our side (with possible fallback
to legacy pairing).

This patch ensures HCI Write Simple Pairing Mode is sent when Set Powered is
called to power on controller and clear HCI_AUTO_OFF flag.

Signed-off-by: Andrzej Kaczmarek &lt;andrzej.kaczmarek@tieto.com&gt;
Acked-by: Johan Hedberg &lt;johan.hedberg@intel.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 3d1cbdd6aefff711bcf389fdabc4af9bc22e8201 upstream.

When new BT USB adapter is plugged in it's configured while still being powered
off (HCI_AUTO_OFF flag is set), thus Set SSP will only set dev_flags but won't
write changes to controller. As a result remote devices won't use Secure Simple
Pairing with our device due to SSP Host Support flag disabled in extended
features and may also reject SSP attempt from our side (with possible fallback
to legacy pairing).

This patch ensures HCI Write Simple Pairing Mode is sent when Set Powered is
called to power on controller and clear HCI_AUTO_OFF flag.

Signed-off-by: Andrzej Kaczmarek &lt;andrzej.kaczmarek@tieto.com&gt;
Acked-by: Johan Hedberg &lt;johan.hedberg@intel.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;

</pre>
</div>
</content>
</entry>
</feed>
