<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/bluetooth, branch v3.0.16</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Bluetooth: Fix timeout on scanning for the second time</title>
<updated>2011-10-03T18:41:01+00:00</updated>
<author>
<name>Oliver Neukum</name>
<email>oliver@neukum.org</email>
</author>
<published>2011-08-30T13:52:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8341e503c2628f056a9fdfe244f15c96b31c04c9'/>
<id>8341e503c2628f056a9fdfe244f15c96b31c04c9</id>
<content type='text'>
commit 2d20a26a92f72e3bb658fe8ce99c3663756e9e7a upstream.

The checks for HCI_INQUIRY and HCI_MGMT were in the wrong order,
so that second scans always failed.

Signed-off-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 2d20a26a92f72e3bb658fe8ce99c3663756e9e7a upstream.

The checks for HCI_INQUIRY and HCI_MGMT were in the wrong order,
so that second scans always failed.

Signed-off-by: Oliver Neukum &lt;oneukum@suse.de&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared</title>
<updated>2011-08-16T01:31:38+00:00</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2011-07-26T06:05:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9cf81e790a0d8709cbadbaff73ee40aa944e2ea1'/>
<id>9cf81e790a0d8709cbadbaff73ee40aa944e2ea1</id>
<content type='text'>
[ Upstream commit 550fd08c2cebad61c548def135f67aba284c6162 ]

After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs.  There are a handful of drivers that violate this assumption of
course, and need to be fixed up.  This patch identifies those drivers, and marks
them as not being able to support the safe transmission of skbs by clearning the
IFF_TX_SKB_SHARING flag in priv_flags

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
CC: Karsten Keil &lt;isdn@linux-pingi.de&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
CC: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: Patrick McHardy &lt;kaber@trash.net&gt;
CC: Krzysztof Halasa &lt;khc@pm.waw.pl&gt;
CC: "John W. Linville" &lt;linville@tuxdriver.com&gt;
CC: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
CC: Marcel Holtmann &lt;marcel@holtmann.org&gt;
CC: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 550fd08c2cebad61c548def135f67aba284c6162 ]

After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs.  There are a handful of drivers that violate this assumption of
course, and need to be fixed up.  This patch identifies those drivers, and marks
them as not being able to support the safe transmission of skbs by clearning the
IFF_TX_SKB_SHARING flag in priv_flags

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
CC: Karsten Keil &lt;isdn@linux-pingi.de&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
CC: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: Patrick McHardy &lt;kaber@trash.net&gt;
CC: Krzysztof Halasa &lt;khc@pm.waw.pl&gt;
CC: "John W. Linville" &lt;linville@tuxdriver.com&gt;
CC: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
CC: Marcel Holtmann &lt;marcel@holtmann.org&gt;
CC: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix crash with incoming L2CAP connections</title>
<updated>2011-07-16T17:14:44+00:00</updated>
<author>
<name>Ilia Kolomisnky</name>
<email>iliak@ti.com</email>
</author>
<published>2011-07-15T18:30:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=05e9a2f67849e427f8900bad0a3f2a939e8dd3d6'/>
<id>05e9a2f67849e427f8900bad0a3f2a939e8dd3d6</id>
<content type='text'>
Another regression fix considering incomming l2cap connections with
defer_setup enabled. In situations when incomming connection is
extracted with l2cap_sock_accept, it's bt_sock info will have
'parent' member zerroed, but 'parent' may be used unconditionally
in l2cap_conn_start() and l2cap_security_cfm() when defer_setup
is enabled.

Backtrace:
[&lt;bf02d5ac&gt;] (l2cap_security_cfm+0x0/0x2ac [bluetooth]) from [&lt;bf01f01c&gt;] (hci_event_pac
ket+0xc2c/0x4aa4 [bluetooth])
[&lt;bf01e3f0&gt;] (hci_event_packet+0x0/0x4aa4 [bluetooth]) from [&lt;bf01a844&gt;] (hci_rx_task+0x
cc/0x27c [bluetooth])
[&lt;bf01a778&gt;] (hci_rx_task+0x0/0x27c [bluetooth]) from [&lt;c008eee4&gt;] (tasklet_action+0xa0/
0x15c)
[&lt;c008ee44&gt;] (tasklet_action+0x0/0x15c) from [&lt;c008f38c&gt;] (__do_softirq+0x98/0x130)
 r7:00000101 r6:00000018 r5:00000001 r4:efc46000
[&lt;c008f2f4&gt;] (__do_softirq+0x0/0x130) from [&lt;c008f524&gt;] (do_softirq+0x4c/0x58)
[&lt;c008f4d8&gt;] (do_softirq+0x0/0x58) from [&lt;c008f5e0&gt;] (run_ksoftirqd+0xb0/0x1b4)
 r4:efc46000 r3:00000001
[&lt;c008f530&gt;] (run_ksoftirqd+0x0/0x1b4) from [&lt;c009f2a8&gt;] (kthread+0x84/0x8c)
 r7:00000000 r6:c008f530 r5:efc47fc4 r4:efc41f08
[&lt;c009f224&gt;] (kthread+0x0/0x8c) from [&lt;c008cc84&gt;] (do_exit+0x0/0x5f0)

Signed-off-by: Ilia Kolomisnky &lt;iliak@ti.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Another regression fix considering incomming l2cap connections with
defer_setup enabled. In situations when incomming connection is
extracted with l2cap_sock_accept, it's bt_sock info will have
'parent' member zerroed, but 'parent' may be used unconditionally
in l2cap_conn_start() and l2cap_security_cfm() when defer_setup
is enabled.

Backtrace:
[&lt;bf02d5ac&gt;] (l2cap_security_cfm+0x0/0x2ac [bluetooth]) from [&lt;bf01f01c&gt;] (hci_event_pac
ket+0xc2c/0x4aa4 [bluetooth])
[&lt;bf01e3f0&gt;] (hci_event_packet+0x0/0x4aa4 [bluetooth]) from [&lt;bf01a844&gt;] (hci_rx_task+0x
cc/0x27c [bluetooth])
[&lt;bf01a778&gt;] (hci_rx_task+0x0/0x27c [bluetooth]) from [&lt;c008eee4&gt;] (tasklet_action+0xa0/
0x15c)
[&lt;c008ee44&gt;] (tasklet_action+0x0/0x15c) from [&lt;c008f38c&gt;] (__do_softirq+0x98/0x130)
 r7:00000101 r6:00000018 r5:00000001 r4:efc46000
[&lt;c008f2f4&gt;] (__do_softirq+0x0/0x130) from [&lt;c008f524&gt;] (do_softirq+0x4c/0x58)
[&lt;c008f4d8&gt;] (do_softirq+0x0/0x58) from [&lt;c008f5e0&gt;] (run_ksoftirqd+0xb0/0x1b4)
 r4:efc46000 r3:00000001
[&lt;c008f530&gt;] (run_ksoftirqd+0x0/0x1b4) from [&lt;c009f2a8&gt;] (kthread+0x84/0x8c)
 r7:00000000 r6:c008f530 r5:efc47fc4 r4:efc41f08
[&lt;c009f224&gt;] (kthread+0x0/0x8c) from [&lt;c008cc84&gt;] (do_exit+0x0/0x5f0)

Signed-off-by: Ilia Kolomisnky &lt;iliak@ti.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix regression in L2CAP connection procedure</title>
<updated>2011-07-16T17:14:44+00:00</updated>
<author>
<name>Gustavo F. Padovan</name>
<email>padovan@profusion.mobi</email>
</author>
<published>2011-07-15T18:30:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9191e6ad897a8b4f0b89aea7c2d3c843f29a8630'/>
<id>9191e6ad897a8b4f0b89aea7c2d3c843f29a8630</id>
<content type='text'>
Caused by the following commit, partially revert it.

commit 9fa7e4f76f3658ba1f44fbdb95c77e7df3f53f95
Author: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
Date:   Thu Jun 30 16:11:30 2011 -0300

    Bluetooth: Fix regression with incoming L2CAP connections

    PTS test A2DP/SRC/SRC_SET/TC_SRC_SET_BV_02_I revealed that
    ( probably after the df3c3931e commit ) the l2cap connection
    could not be established in case when the "Auth Complete" HCI
    event does not arive before the initiator send "Configuration
    request", in which case l2cap replies with "Command rejected"
    since the channel is still in BT_CONNECT2 state.

Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Caused by the following commit, partially revert it.

commit 9fa7e4f76f3658ba1f44fbdb95c77e7df3f53f95
Author: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
Date:   Thu Jun 30 16:11:30 2011 -0300

    Bluetooth: Fix regression with incoming L2CAP connections

    PTS test A2DP/SRC/SRC_SET/TC_SRC_SET_BV_02_I revealed that
    ( probably after the df3c3931e commit ) the l2cap connection
    could not be established in case when the "Auth Complete" HCI
    event does not arive before the initiator send "Configuration
    request", in which case l2cap replies with "Command rejected"
    since the channel is still in BT_CONNECT2 state.

Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix memory leak under page timeouts</title>
<updated>2011-06-30T19:32:52+00:00</updated>
<author>
<name>Tomas Targownik</name>
<email>ttargownik@geicp.com</email>
</author>
<published>2011-06-30T19:30:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=163f4dabea4e3be485c17e8f08e3a6468ad31cbf'/>
<id>163f4dabea4e3be485c17e8f08e3a6468ad31cbf</id>
<content type='text'>
If the remote device is not present, the connections attemp fails and
the struct hci_conn was not freed

Signed-off-by: Tomas Targownik &lt;ttargownik@geicp.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the remote device is not present, the connections attemp fails and
the struct hci_conn was not freed

Signed-off-by: Tomas Targownik &lt;ttargownik@geicp.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix regression with incoming L2CAP connections</title>
<updated>2011-06-30T19:17:57+00:00</updated>
<author>
<name>Gustavo F. Padovan</name>
<email>padovan@profusion.mobi</email>
</author>
<published>2011-06-30T19:11:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9fa7e4f76f3658ba1f44fbdb95c77e7df3f53f95'/>
<id>9fa7e4f76f3658ba1f44fbdb95c77e7df3f53f95</id>
<content type='text'>
PTS test A2DP/SRC/SRC_SET/TC_SRC_SET_BV_02_I revealed that
( probably after the df3c3931e commit ) the l2cap connection
could not be established in case when the "Auth Complete" HCI
event does not arive before the initiator send "Configuration
request", in which case l2cap replies with "Command rejected"
since the channel is still in BT_CONNECT2 state.

Based on patch from: Ilia Kolomisnky &lt;iliak@ti.com&gt;

Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PTS test A2DP/SRC/SRC_SET/TC_SRC_SET_BV_02_I revealed that
( probably after the df3c3931e commit ) the l2cap connection
could not be established in case when the "Auth Complete" HCI
event does not arive before the initiator send "Configuration
request", in which case l2cap replies with "Command rejected"
since the channel is still in BT_CONNECT2 state.

Based on patch from: Ilia Kolomisnky &lt;iliak@ti.com&gt;

Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix hidp disconnect deadlocks and lost wakeup</title>
<updated>2011-06-30T18:47:50+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2011-06-30T17:53:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7bb59df83b190817f56c4e2fec3078d99d906ad4'/>
<id>7bb59df83b190817f56c4e2fec3078d99d906ad4</id>
<content type='text'>
Partial revert of commit aabf6f89. When the hidp session thread
was converted from kernel_thread to kthread, the atomic/wakeups
were replaced with kthread_stop. kthread_stop has blocking semantics
which are inappropriate for the hidp session kthread. In addition,
the kthread signals itself to terminate in hidp_process_hid_control()
- it cannot do this with kthread_stop().

Lastly, a wakeup can be lost if the wakeup happens between checking
for the loop exit condition and setting the current state to
TASK_INTERRUPTIBLE. (Without appropriate synchronization mechanisms,
the task state should not be changed between the condition test and
the yield - via schedule() - as this creates a race between the
wakeup and resetting the state back to interruptible.)

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Partial revert of commit aabf6f89. When the hidp session thread
was converted from kernel_thread to kthread, the atomic/wakeups
were replaced with kthread_stop. kthread_stop has blocking semantics
which are inappropriate for the hidp session kthread. In addition,
the kthread signals itself to terminate in hidp_process_hid_control()
- it cannot do this with kthread_stop().

Lastly, a wakeup can be lost if the wakeup happens between checking
for the loop exit condition and setting the current state to
TASK_INTERRUPTIBLE. (Without appropriate synchronization mechanisms,
the task state should not be changed between the condition test and
the yield - via schedule() - as this creates a race between the
wakeup and resetting the state back to interruptible.)

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Prevent buffer overflow in l2cap config request</title>
<updated>2011-06-28T17:57:55+00:00</updated>
<author>
<name>Dan Rosenberg</name>
<email>drosenberg@vsecurity.com</email>
</author>
<published>2011-06-24T12:38:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7ac28817536797fd40e9646452183606f9e17f71'/>
<id>7ac28817536797fd40e9646452183606f9e17f71</id>
<content type='text'>
A remote user can provide a small value for the command size field in
the command header of an l2cap configuration request, resulting in an
integer underflow when subtracting the size of the configuration request
header.  This results in copying a very large amount of data via
memcpy() and destroying the kernel heap.  Check for underflow.

Signed-off-by: Dan Rosenberg &lt;drosenberg@vsecurity.com&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A remote user can provide a small value for the command size field in
the command header of an l2cap configuration request, resulting in an
integer underflow when subtracting the size of the configuration request
header.  This results in copying a very large amount of data via
memcpy() and destroying the kernel heap.  Check for underflow.

Signed-off-by: Dan Rosenberg &lt;drosenberg@vsecurity.com&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix L2CAP connection establishment</title>
<updated>2011-06-15T18:03:37+00:00</updated>
<author>
<name>Ilia Kolomisnky</name>
<email>ilia.kolominsky@gmail.com</email>
</author>
<published>2011-06-15T03:52:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=330605423ca6eafafb8dcc27502bce1c585d1b06'/>
<id>330605423ca6eafafb8dcc27502bce1c585d1b06</id>
<content type='text'>
In hci_conn_security ( which is used during L2CAP connection
establishment ) test for HCI_CONN_ENCRYPT_PEND state also
sets this state, which is bogus and leads to connection time-out
on L2CAP sockets in certain situations (especially when
using non-ssp devices )

Signed-off-by: Ilia Kolomisnky &lt;iliak@ti.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In hci_conn_security ( which is used during L2CAP connection
establishment ) test for HCI_CONN_ENCRYPT_PEND state also
sets this state, which is bogus and leads to connection time-out
on L2CAP sockets in certain situations (especially when
using non-ssp devices )

Signed-off-by: Ilia Kolomisnky &lt;iliak@ti.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix accepting connect requests for defer_setup</title>
<updated>2011-06-14T17:48:01+00:00</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2011-06-14T09:48:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=df3c3931ec58cca3409c71b18ad6da0cd71fe163'/>
<id>df3c3931ec58cca3409c71b18ad6da0cd71fe163</id>
<content type='text'>
When authentication completes we shouldn't blindly accept any pending
L2CAP connect requests. If the socket has the defer_setup feature
enabled it should still wait for user space acceptance of the connect
request. The issue only happens for non-SSP connections since with SSP
the L2CAP Connect request may not be sent for non-SDP PSMs before
authentication has completed successfully.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When authentication completes we shouldn't blindly accept any pending
L2CAP connect requests. If the socket has the defer_setup feature
enabled it should still wait for user space acceptance of the connect
request. The issue only happens for non-SSP connections since with SSP
the L2CAP Connect request may not be sent for non-SDP PSMs before
authentication has completed successfully.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Gustavo F. Padovan &lt;padovan@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
</feed>
