<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/bluetooth, branch v3.18</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.18</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-10-02T10:41:57Z</updated>
<entry>
<title>Bluetooth: 6lowpan: Check transmit errors for multicast packets</title>
<updated>2014-10-02T10:41:57Z</updated>
<author>
<name>Jukka Rissanen</name>
<email>jukka.rissanen@linux.intel.com</email>
</author>
<published>2014-10-01T12:59:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9c238ca8ec79c38ab22762b44aeaf7a42fc97b18'/>
<id>urn:sha1:9c238ca8ec79c38ab22762b44aeaf7a42fc97b18</id>
<content type='text'>
We did not return error if multicast packet transmit failed.
This might not be desired so return error also in this case.
If there are multiple 6lowpan devices where the multicast packet
is sent, then return error even if sending to only one of them fails.

Signed-off-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: 6lowpan: Return EAGAIN error also for multicast packets</title>
<updated>2014-10-02T10:41:39Z</updated>
<author>
<name>Jukka Rissanen</name>
<email>jukka.rissanen@linux.intel.com</email>
</author>
<published>2014-10-01T12:59:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d7b6b0a532da7de25e16deed610658cfa1969fe9'/>
<id>urn:sha1:d7b6b0a532da7de25e16deed610658cfa1969fe9</id>
<content type='text'>
Make sure that we are able to return EAGAIN from l2cap_chan_send()
even for multicast packets. The error code was ignored unncessarily.

Signed-off-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: 6lowpan: Avoid memory leak if memory allocation fails</title>
<updated>2014-10-02T10:41:32Z</updated>
<author>
<name>Jukka Rissanen</name>
<email>jukka.rissanen@linux.intel.com</email>
</author>
<published>2014-10-01T08:30:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a7807d73a0fa9b33dbdfd5f1cb97970ccc91d77e'/>
<id>urn:sha1:a7807d73a0fa9b33dbdfd5f1cb97970ccc91d77e</id>
<content type='text'>
If skb_unshare() returns NULL, then we leak the original skb.
Solution is to use temp variable to hold the new skb.

Signed-off-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: 6lowpan: Memory leak as the skb is not freed</title>
<updated>2014-10-02T10:41:30Z</updated>
<author>
<name>Jukka Rissanen</name>
<email>jukka.rissanen@linux.intel.com</email>
</author>
<published>2014-10-01T08:30:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fc12518a4bcbd4214652291df76f692343bca3d5'/>
<id>urn:sha1:fc12518a4bcbd4214652291df76f692343bca3d5</id>
<content type='text'>
The earlier multicast commit 36b3dd250dde ("Bluetooth: 6lowpan:
Ensure header compression does not corrupt IPv6 header") lost one
skb free which then caused memory leak.

Signed-off-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix lockdep warning with l2cap_chan_connect</title>
<updated>2014-10-02T08:37:07Z</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2014-10-02T07:16:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=02e246aee868e982eecc25ee97d02acf2c2b8884'/>
<id>urn:sha1:02e246aee868e982eecc25ee97d02acf2c2b8884</id>
<content type='text'>
The L2CAP connection's channel list lock (conn-&gt;chan_lock) must never be
taken while already holding a channel lock (chan-&gt;lock) in order to
avoid lock-inversion and lockdep warnings. So far the l2cap_chan_connect
function has acquired the chan-&gt;lock early in the function and then
later called l2cap_chan_add(conn, chan) which will try to take the
conn-&gt;chan_lock. This violates the correct order of taking the locks and
may lead to the following type of lockdep warnings:

-&gt; #1 (&amp;conn-&gt;chan_lock){+.+...}:
       [&lt;c109324d&gt;] lock_acquire+0x9d/0x140
       [&lt;c188459c&gt;] mutex_lock_nested+0x6c/0x420
       [&lt;d0aab48e&gt;] l2cap_chan_add+0x1e/0x40 [bluetooth]
       [&lt;d0aac618&gt;] l2cap_chan_connect+0x348/0x8f0 [bluetooth]
       [&lt;d0cc9a91&gt;] lowpan_control_write+0x221/0x2d0 [bluetooth_6lowpan]
-&gt; #0 (&amp;chan-&gt;lock){+.+.+.}:
       [&lt;c10928d8&gt;] __lock_acquire+0x1a18/0x1d20
       [&lt;c109324d&gt;] lock_acquire+0x9d/0x140
       [&lt;c188459c&gt;] mutex_lock_nested+0x6c/0x420
       [&lt;d0ab05fd&gt;] l2cap_connect_cfm+0x1dd/0x3f0 [bluetooth]
       [&lt;d0a909c4&gt;] hci_le_meta_evt+0x11a4/0x1260 [bluetooth]
       [&lt;d0a910eb&gt;] hci_event_packet+0x3ab/0x3120 [bluetooth]
       [&lt;d0a7cb08&gt;] hci_rx_work+0x208/0x4a0 [bluetooth]

       CPU0                    CPU1
       ----                    ----
  lock(&amp;conn-&gt;chan_lock);
                               lock(&amp;chan-&gt;lock);
                               lock(&amp;conn-&gt;chan_lock);
  lock(&amp;chan-&gt;lock);

Before calling l2cap_chan_add() the channel is not part of the
conn-&gt;chan_l list, and can therefore only be accessed by the L2CAP user
(such as l2cap_sock.c). We can therefore assume that it is the
responsibility of the user to handle mutual exclusion until this point
(which we can see is already true in l2cap_sock.c by it in many places
touching chan members without holding chan-&gt;lock).

Since the hci_conn and by exctension l2cap_conn creation in the
l2cap_chan_connect() function depend on chan details we cannot simply
add a mutex_lock(&amp;conn-&gt;chan_lock) in the beginning of the function
(since the conn object doesn't yet exist there). What we can do however
is move the chan-&gt;lock taking later into the function where we already
have the conn object and can that way take conn-&gt;chan_lock first.

This patch implements the above strategy and does some other necessary
changes such as using __l2cap_chan_add() which assumes conn-&gt;chan_lock
is held, as well as adding a second needed label so the unlocking
happens as it should.

Reported-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Tested-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Acked-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: 6lowpan: Enable multicast support</title>
<updated>2014-09-29T15:06:38Z</updated>
<author>
<name>Jukka Rissanen</name>
<email>jukka.rissanen@linux.intel.com</email>
</author>
<published>2014-09-29T13:37:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=156395c9989a76228e0da40e71267a3d4fb07419'/>
<id>urn:sha1:156395c9989a76228e0da40e71267a3d4fb07419</id>
<content type='text'>
Set multicast support for 6lowpan network interface.
This is needed in every network interface that supports IPv6.

Signed-off-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: 6lowpan: Ensure header compression does not corrupt IPv6 header</title>
<updated>2014-09-29T15:06:38Z</updated>
<author>
<name>Jukka Rissanen</name>
<email>jukka.rissanen@linux.intel.com</email>
</author>
<published>2014-09-29T13:37:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=36b3dd250dde5317fa6bb8c9010e1e7ab7f2265a'/>
<id>urn:sha1:36b3dd250dde5317fa6bb8c9010e1e7ab7f2265a</id>
<content type='text'>
If skb is going to multiple destinations, then make sure that we
do not overwrite the common IPv6 headers. So before compressing
the IPv6 headers, we copy the skb and that is then sent to 6LoWPAN
Bluetooth devices.

This is a similar patch as what was done for IEEE 802.154 6LoWPAN
in commit f19f4f9525cf3 ("ieee802154: 6lowpan: ensure header compression
does not corrupt ipv6 header")

Signed-off-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: 6lowpan: Make sure skb exists before accessing it</title>
<updated>2014-09-29T08:10:02Z</updated>
<author>
<name>Jukka Rissanen</name>
<email>jukka.rissanen@linux.intel.com</email>
</author>
<published>2014-09-29T07:55:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=59790aa2873cb3c32db02c777f08eb19faccf5fa'/>
<id>urn:sha1:59790aa2873cb3c32db02c777f08eb19faccf5fa</id>
<content type='text'>
We need to make sure that the saved skb exists when
resuming or suspending a CoC channel. This can happen if
initial credits is 0 when channel is connected.

Signed-off-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Rename sco_param_wideband table to esco_param_msbc</title>
<updated>2014-09-25T08:35:08Z</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2014-09-25T06:48:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=565766b087a6d6ff257f5b79c8ceda0188c9169f'/>
<id>urn:sha1:565766b087a6d6ff257f5b79c8ceda0188c9169f</id>
<content type='text'>
The sco_param_wideband table represents the eSCO parameters for
specifically mSBC encoding. This patch renames the table to the more
descriptive esco_param_msbc name.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Add retransmission effort into SCO parameter table</title>
<updated>2014-09-24T20:15:29Z</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2014-09-24T19:41:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c7da579763f29cf45a861ad4c339aba590d8b80d'/>
<id>urn:sha1:c7da579763f29cf45a861ad4c339aba590d8b80d</id>
<content type='text'>
It is expected that new parameter combinations will have the
retransmission effort value different between some entries (mainly
because of the new S4 configuration added by HFP 1.7), so it makes sense
to move it into the table instead of having it hard coded based on the
selected SCO_AIRMODE_*.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
</feed>
