<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/bluetooth, branch v3.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-02-15T11:09:26Z</updated>
<entry>
<title>Bluetooth: Remove usage of __cancel_delayed_work()</title>
<updated>2012-02-15T11:09:26Z</updated>
<author>
<name>Ulisses Furquim</name>
<email>ulisses@profusion.mobi</email>
</author>
<published>2012-01-30T20:26:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6de32750822d00bfa92c341166132b0714c5b559'/>
<id>urn:sha1:6de32750822d00bfa92c341166132b0714c5b559</id>
<content type='text'>
__cancel_delayed_work() is being used in some paths where we cannot
sleep waiting for the delayed work to finish. However, that function
might return while the timer is running and the work will be queued
again. Replace the calls with safer cancel_delayed_work() version
which spins until the timer handler finishes on other CPUs and
cancels the delayed work.

Signed-off-by: Ulisses Furquim &lt;ulisses@profusion.mobi&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix potential deadlock</title>
<updated>2012-02-15T11:09:26Z</updated>
<author>
<name>Andre Guedes</name>
<email>andre.guedes@openbossa.org</email>
</author>
<published>2012-01-27T22:42:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a51cd2be864a3cc0272359b1995e213341dfc7e7'/>
<id>urn:sha1:a51cd2be864a3cc0272359b1995e213341dfc7e7</id>
<content type='text'>
We don't need to use the _sync variant in hci_conn_hold and
hci_conn_put to cancel conn-&gt;disc_work delayed work. This way
we avoid potential deadlocks like this one reported by lockdep.

======================================================
[ INFO: possible circular locking dependency detected ]
3.2.0+ #1 Not tainted
-------------------------------------------------------
kworker/u:1/17 is trying to acquire lock:
 (&amp;hdev-&gt;lock){+.+.+.}, at: [&lt;ffffffffa0041155&gt;] hci_conn_timeout+0x62/0x158 [bluetooth]

but task is already holding lock:
 ((&amp;(&amp;conn-&gt;disc_work)-&gt;work)){+.+...}, at: [&lt;ffffffff81035751&gt;] process_one_work+0x11a/0x2bf

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #2 ((&amp;(&amp;conn-&gt;disc_work)-&gt;work)){+.+...}:
       [&lt;ffffffff81057444&gt;] lock_acquire+0x8a/0xa7
       [&lt;ffffffff81034ed1&gt;] wait_on_work+0x3d/0xaa
       [&lt;ffffffff81035b54&gt;] __cancel_work_timer+0xac/0xef
       [&lt;ffffffff81035ba4&gt;] cancel_delayed_work_sync+0xd/0xf
       [&lt;ffffffffa00554b0&gt;] smp_chan_create+0xde/0xe6 [bluetooth]
       [&lt;ffffffffa0056160&gt;] smp_conn_security+0xa3/0x12d [bluetooth]
       [&lt;ffffffffa0053640&gt;] l2cap_connect_cfm+0x237/0x2e8 [bluetooth]
       [&lt;ffffffffa004239c&gt;] hci_proto_connect_cfm+0x2d/0x6f [bluetooth]
       [&lt;ffffffffa0046ea5&gt;] hci_event_packet+0x29d1/0x2d60 [bluetooth]
       [&lt;ffffffffa003dde3&gt;] hci_rx_work+0xd0/0x2e1 [bluetooth]
       [&lt;ffffffff810357af&gt;] process_one_work+0x178/0x2bf
       [&lt;ffffffff81036178&gt;] worker_thread+0xce/0x152
       [&lt;ffffffff81039a03&gt;] kthread+0x95/0x9d
       [&lt;ffffffff812e7754&gt;] kernel_thread_helper+0x4/0x10

-&gt; #1 (slock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+...}:
       [&lt;ffffffff81057444&gt;] lock_acquire+0x8a/0xa7
       [&lt;ffffffff812e553a&gt;] _raw_spin_lock_bh+0x36/0x6a
       [&lt;ffffffff81244d56&gt;] lock_sock_nested+0x24/0x7f
       [&lt;ffffffffa004d96f&gt;] lock_sock+0xb/0xd [bluetooth]
       [&lt;ffffffffa0052906&gt;] l2cap_chan_connect+0xa9/0x26f [bluetooth]
       [&lt;ffffffffa00545f8&gt;] l2cap_sock_connect+0xb3/0xff [bluetooth]
       [&lt;ffffffff81243b48&gt;] sys_connect+0x69/0x8a
       [&lt;ffffffff812e6579&gt;] system_call_fastpath+0x16/0x1b

-&gt; #0 (&amp;hdev-&gt;lock){+.+.+.}:
       [&lt;ffffffff81056d06&gt;] __lock_acquire+0xa80/0xd74
       [&lt;ffffffff81057444&gt;] lock_acquire+0x8a/0xa7
       [&lt;ffffffff812e3870&gt;] __mutex_lock_common+0x48/0x38e
       [&lt;ffffffff812e3c75&gt;] mutex_lock_nested+0x2a/0x31
       [&lt;ffffffffa0041155&gt;] hci_conn_timeout+0x62/0x158 [bluetooth]
       [&lt;ffffffff810357af&gt;] process_one_work+0x178/0x2bf
       [&lt;ffffffff81036178&gt;] worker_thread+0xce/0x152
       [&lt;ffffffff81039a03&gt;] kthread+0x95/0x9d
       [&lt;ffffffff812e7754&gt;] kernel_thread_helper+0x4/0x10

other info that might help us debug this:

Chain exists of:
  &amp;hdev-&gt;lock --&gt; slock-AF_BLUETOOTH-BTPROTO_L2CAP --&gt; (&amp;(&amp;conn-&gt;disc_work)-&gt;work)

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock((&amp;(&amp;conn-&gt;disc_work)-&gt;work));
                               lock(slock-AF_BLUETOOTH-BTPROTO_L2CAP);
                               lock((&amp;(&amp;conn-&gt;disc_work)-&gt;work));
  lock(&amp;hdev-&gt;lock);

 *** DEADLOCK ***

2 locks held by kworker/u:1/17:
 #0:  (hdev-&gt;name){.+.+.+}, at: [&lt;ffffffff81035751&gt;] process_one_work+0x11a/0x2bf
 #1:  ((&amp;(&amp;conn-&gt;disc_work)-&gt;work)){+.+...}, at: [&lt;ffffffff81035751&gt;] process_one_work+0x11a/0x2bf

stack backtrace:
Pid: 17, comm: kworker/u:1 Not tainted 3.2.0+ #1
Call Trace:
 [&lt;ffffffff812e06c6&gt;] print_circular_bug+0x1f8/0x209
 [&lt;ffffffff81056d06&gt;] __lock_acquire+0xa80/0xd74
 [&lt;ffffffff81021ef2&gt;] ? arch_local_irq_restore+0x6/0xd
 [&lt;ffffffff81022bc7&gt;] ? vprintk+0x3f9/0x41e
 [&lt;ffffffff81057444&gt;] lock_acquire+0x8a/0xa7
 [&lt;ffffffffa0041155&gt;] ? hci_conn_timeout+0x62/0x158 [bluetooth]
 [&lt;ffffffff812e3870&gt;] __mutex_lock_common+0x48/0x38e
 [&lt;ffffffffa0041155&gt;] ? hci_conn_timeout+0x62/0x158 [bluetooth]
 [&lt;ffffffff81190fd6&gt;] ? __dynamic_pr_debug+0x6d/0x6f
 [&lt;ffffffffa0041155&gt;] ? hci_conn_timeout+0x62/0x158 [bluetooth]
 [&lt;ffffffff8105320f&gt;] ? trace_hardirqs_off+0xd/0xf
 [&lt;ffffffff812e3c75&gt;] mutex_lock_nested+0x2a/0x31
 [&lt;ffffffffa0041155&gt;] hci_conn_timeout+0x62/0x158 [bluetooth]
 [&lt;ffffffff810357af&gt;] process_one_work+0x178/0x2bf
 [&lt;ffffffff81035751&gt;] ? process_one_work+0x11a/0x2bf
 [&lt;ffffffff81055af3&gt;] ? lock_acquired+0x1d0/0x1df
 [&lt;ffffffffa00410f3&gt;] ? hci_acl_disconn+0x65/0x65 [bluetooth]
 [&lt;ffffffff81036178&gt;] worker_thread+0xce/0x152
 [&lt;ffffffff810407ed&gt;] ? finish_task_switch+0x45/0xc5
 [&lt;ffffffff810360aa&gt;] ? manage_workers.isra.25+0x16a/0x16a
 [&lt;ffffffff81039a03&gt;] kthread+0x95/0x9d
 [&lt;ffffffff812e7754&gt;] kernel_thread_helper+0x4/0x10
 [&lt;ffffffff812e5db4&gt;] ? retint_restore_args+0x13/0x13
 [&lt;ffffffff8103996e&gt;] ? __init_kthread_worker+0x55/0x55
 [&lt;ffffffff812e7750&gt;] ? gs_change+0x13/0x13

Signed-off-by: Andre Guedes &lt;andre.guedes@openbossa.org&gt;
Signed-off-by: Vinicius Costa Gomes &lt;vinicius.gomes@openbossa.org&gt;
Reviewed-by: Ulisses Furquim &lt;ulisses@profusion.mobi&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: silence lockdep warning</title>
<updated>2012-02-15T11:09:26Z</updated>
<author>
<name>Octavian Purdila</name>
<email>tavi.purdila@gmail.com</email>
</author>
<published>2012-01-21T22:28:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b5a30dda6598af216c070165ece6068f9f00f33a'/>
<id>urn:sha1:b5a30dda6598af216c070165ece6068f9f00f33a</id>
<content type='text'>
Since bluetooth uses multiple protocols types, to avoid lockdep
warnings, we need to use different lockdep classes (one for each
protocol type).

This is already done in bt_sock_create but it misses a couple of cases
when new connections are created. This patch corrects that to fix the
following warning:

&lt;4&gt;[ 1864.732366] =======================================================
&lt;4&gt;[ 1864.733030] [ INFO: possible circular locking dependency detected ]
&lt;4&gt;[ 1864.733544] 3.0.16-mid3-00007-gc9a0f62 #3
&lt;4&gt;[ 1864.733883] -------------------------------------------------------
&lt;4&gt;[ 1864.734408] t.android.btclc/4204 is trying to acquire lock:
&lt;4&gt;[ 1864.734869]  (rfcomm_mutex){+.+.+.}, at: [&lt;c14970ea&gt;] rfcomm_dlc_close+0x15/0x30
&lt;4&gt;[ 1864.735541]
&lt;4&gt;[ 1864.735549] but task is already holding lock:
&lt;4&gt;[ 1864.736045]  (sk_lock-AF_BLUETOOTH){+.+.+.}, at: [&lt;c1498bf7&gt;] lock_sock+0xa/0xc
&lt;4&gt;[ 1864.736732]
&lt;4&gt;[ 1864.736740] which lock already depends on the new lock.
&lt;4&gt;[ 1864.736750]
&lt;4&gt;[ 1864.737428]
&lt;4&gt;[ 1864.737437] the existing dependency chain (in reverse order) is:
&lt;4&gt;[ 1864.738016]
&lt;4&gt;[ 1864.738023] -&gt; #1 (sk_lock-AF_BLUETOOTH){+.+.+.}:
&lt;4&gt;[ 1864.738549]        [&lt;c1062273&gt;] lock_acquire+0x104/0x140
&lt;4&gt;[ 1864.738977]        [&lt;c13d35c1&gt;] lock_sock_nested+0x58/0x68
&lt;4&gt;[ 1864.739411]        [&lt;c1493c33&gt;] l2cap_sock_sendmsg+0x3e/0x76
&lt;4&gt;[ 1864.739858]        [&lt;c13d06c3&gt;] __sock_sendmsg+0x50/0x59
&lt;4&gt;[ 1864.740279]        [&lt;c13d0ea2&gt;] sock_sendmsg+0x94/0xa8
&lt;4&gt;[ 1864.740687]        [&lt;c13d0ede&gt;] kernel_sendmsg+0x28/0x37
&lt;4&gt;[ 1864.741106]        [&lt;c14969ca&gt;] rfcomm_send_frame+0x30/0x38
&lt;4&gt;[ 1864.741542]        [&lt;c1496a2a&gt;] rfcomm_send_ua+0x58/0x5a
&lt;4&gt;[ 1864.741959]        [&lt;c1498447&gt;] rfcomm_run+0x441/0xb52
&lt;4&gt;[ 1864.742365]        [&lt;c104f095&gt;] kthread+0x63/0x68
&lt;4&gt;[ 1864.742742]        [&lt;c14d5182&gt;] kernel_thread_helper+0x6/0xd
&lt;4&gt;[ 1864.743187]
&lt;4&gt;[ 1864.743193] -&gt; #0 (rfcomm_mutex){+.+.+.}:
&lt;4&gt;[ 1864.743667]        [&lt;c1061ada&gt;] __lock_acquire+0x988/0xc00
&lt;4&gt;[ 1864.744100]        [&lt;c1062273&gt;] lock_acquire+0x104/0x140
&lt;4&gt;[ 1864.744519]        [&lt;c14d2c70&gt;] __mutex_lock_common+0x3b/0x33f
&lt;4&gt;[ 1864.744975]        [&lt;c14d303e&gt;] mutex_lock_nested+0x2d/0x36
&lt;4&gt;[ 1864.745412]        [&lt;c14970ea&gt;] rfcomm_dlc_close+0x15/0x30
&lt;4&gt;[ 1864.745842]        [&lt;c14990d9&gt;] __rfcomm_sock_close+0x5f/0x6b
&lt;4&gt;[ 1864.746288]        [&lt;c1499114&gt;] rfcomm_sock_shutdown+0x2f/0x62
&lt;4&gt;[ 1864.746737]        [&lt;c13d275d&gt;] sys_socketcall+0x1db/0x422
&lt;4&gt;[ 1864.747165]        [&lt;c14d42f0&gt;] syscall_call+0x7/0xb

Signed-off-by: Octavian Purdila &lt;octavian.purdila@intel.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix using an absolute timeout on hci_conn_put()</title>
<updated>2012-02-15T11:09:26Z</updated>
<author>
<name>Vinicius Costa Gomes</name>
<email>vinicius.gomes@openbossa.org</email>
</author>
<published>2012-01-04T14:57:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=331660637b4e5136602a98200a84f6b65ed8d5be'/>
<id>urn:sha1:331660637b4e5136602a98200a84f6b65ed8d5be</id>
<content type='text'>
queue_delayed_work() expects a relative time for when that work
should be scheduled.

Signed-off-by: Vinicius Costa Gomes &lt;vinicius.gomes@openbossa.org&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: l2cap_set_timer needs jiffies as timeout value</title>
<updated>2012-02-15T11:09:25Z</updated>
<author>
<name>Andrzej Kaczmarek</name>
<email>andrzej.kaczmarek@tieto.com</email>
</author>
<published>2012-01-04T11:10:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6e1da683f79a22fafaada62d547138daaa9e3456'/>
<id>urn:sha1:6e1da683f79a22fafaada62d547138daaa9e3456</id>
<content type='text'>
After moving L2CAP timers to workqueues l2cap_set_timer expects timeout
value to be specified in jiffies but constants defined in miliseconds
are used. This makes timeouts unreliable when CONFIG_HZ is not set to
1000.

__set_chan_timer macro still uses jiffies as input to avoid multiple
conversions from/to jiffies for sk_sndtimeo value which is already
specified in jiffies.

Signed-off-by: Andrzej Kaczmarek &lt;andrzej.kaczmarek@tieto.com&gt;
Ackec-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Remove bogus inline declaration from l2cap_chan_connect</title>
<updated>2012-02-15T11:09:25Z</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2012-01-08T20:51:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4aa832c27edf902130f8bace1d42cf22468823fa'/>
<id>urn:sha1:4aa832c27edf902130f8bace1d42cf22468823fa</id>
<content type='text'>
As reported by Dan Carpenter this function causes a Sparse warning and
shouldn't be declared inline:

include/net/bluetooth/l2cap.h:837:30 error: marked inline, but without a
definition"

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>bluetooth: hci: Fix type of "enable_hs" to bool.</title>
<updated>2012-01-22T20:08:46Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-01-22T19:45:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b1cc16b8e643096adb92bbcb76c6c4c564141c40'/>
<id>urn:sha1:b1cc16b8e643096adb92bbcb76c6c4c564141c40</id>
<content type='text'>
Fixes:

net/bluetooth/hci_core.c: In function ‘__check_enable_hs’:
net/bluetooth/hci_core.c:2587:1: warning: return from incompatible pointer type [enabled by default]

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-next</title>
<updated>2012-01-10T20:44:17Z</updated>
<author>
<name>John W. Linville</name>
<email>linville@tuxdriver.com</email>
</author>
<published>2012-01-10T20:44:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=874c60bad92564358e87d58f505fceb0b09ec1aa'/>
<id>urn:sha1:874c60bad92564358e87d58f505fceb0b09ec1aa</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem</title>
<updated>2012-01-03T20:16:34Z</updated>
<author>
<name>John W. Linville</name>
<email>linville@tuxdriver.com</email>
</author>
<published>2012-01-03T20:16:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=57adc1fcbae2c13104ce291b40f23e40a414fa87'/>
<id>urn:sha1:57adc1fcbae2c13104ce291b40f23e40a414fa87</id>
<content type='text'>
Conflicts:
	drivers/net/wireless/b43/dma.c
	drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
</content>
</entry>
<entry>
<title>Bluetooth: Rename extfeatures</title>
<updated>2012-01-03T00:21:05Z</updated>
<author>
<name>Andre Guedes</name>
<email>aguedespe@gmail.com</email>
</author>
<published>2011-12-30T13:34:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=59e294065ddee7074af91e4f5e12e6095eb1135b'/>
<id>urn:sha1:59e294065ddee7074af91e4f5e12e6095eb1135b</id>
<content type='text'>
This patch renames hdev-&gt;extfeatures to hdev-&gt;host_features since it
holds the extended features Page 1 (aka host features).

Signed-off-by: Andre Guedes &lt;aguedespe@gmail.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</content>
</entry>
</feed>
