<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/bluetooth/rfcomm/core.c, branch linux-2.6.28.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2008-12-19T03:35:10Z</updated>
<entry>
<title>net: Fix module refcount leak in kernel_accept()</title>
<updated>2008-12-19T03:35:10Z</updated>
<author>
<name>Wei Yongjun</name>
</author>
<published>2008-12-19T03:35:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1b08534e562dae7b084326f8aa8cc12a4c1b6593'/>
<id>urn:sha1:1b08534e562dae7b084326f8aa8cc12a4c1b6593</id>
<content type='text'>
The kernel_accept() does not hold the module refcount of newsock-&gt;ops-&gt;owner,
so we need __module_get(newsock-&gt;ops-&gt;owner) code after call kernel_accept()
by hand.
In sunrpc, the module refcount is missing to hold. So this cause kernel panic.

Used following script to reproduct:

while [ 1 ];
do
    mount -t nfs4 192.168.0.19:/ /mnt
    touch /mnt/file
    umount /mnt
    lsmod | grep ipv6
done

This patch fixed the problem by add __module_get(newsock-&gt;ops-&gt;owner) to
kernel_accept(). So we do not need to used __module_get(newsock-&gt;ops-&gt;owner)
in every place when used kernel_accept().

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[Bluetooth] Consolidate maintainers information</title>
<updated>2008-08-18T11:23:53Z</updated>
<author>
<name>Marcel Holtmann</name>
</author>
<published>2008-08-18T11:23:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=63fbd24e5102eecfc9d049ed7f4be7f9a25f814f'/>
<id>urn:sha1:63fbd24e5102eecfc9d049ed7f4be7f9a25f814f</id>
<content type='text'>
The Bluetooth entries for the MAINTAINERS file are a little bit too
much. Consolidate them into two entries. One for Bluetooth drivers and
another one for the Bluetooth subsystem.

Also the MODULE_AUTHOR should indicate the current maintainer of the
module and actually not the original author. Fix all Bluetooth modules
to provide current maintainer information.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6</title>
<updated>2008-07-19T07:30:39Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2008-07-19T07:30:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=407d819cf0fd54c6fc1138a509225696aecafd15'/>
<id>urn:sha1:407d819cf0fd54c6fc1138a509225696aecafd15</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[Bluetooth] Move pending packets from RFCOMM socket to TTY</title>
<updated>2008-07-14T18:13:52Z</updated>
<author>
<name>Marcel Holtmann</name>
</author>
<published>2008-07-14T18:13:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a0c22f226502be6eab37a1d9bf6fb0fadf551376'/>
<id>urn:sha1:a0c22f226502be6eab37a1d9bf6fb0fadf551376</id>
<content type='text'>
When an incoming RFCOMM socket connection gets converted into a TTY,
it can happen that packets are lost. This mainly happens with the
Handsfree profile where the remote side starts sending data right
away. The problem is that these packets are in the socket receive
queue. So when creating the TTY make sure to copy all pending packets
from the socket receive queue to a private queue inside the TTY.

To make this actually work, the flow control on the newly created TTY
will be disabled and only enabled again when the TTY is opened by an
application. And right before that, the pending packets will be put
into the TTY flip buffer.

Signed-off-by: Denis Kenzior &lt;denis.kenzior@trolltech.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>[Bluetooth] Store remote modem status for RFCOMM TTY</title>
<updated>2008-07-14T18:13:52Z</updated>
<author>
<name>Marcel Holtmann</name>
</author>
<published>2008-07-14T18:13:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8b6b3da765af9600b5edd8e3e84a20523e975884'/>
<id>urn:sha1:8b6b3da765af9600b5edd8e3e84a20523e975884</id>
<content type='text'>
When switching a RFCOMM socket to a TTY, the remote modem status might
be needed later. Currently it is lost since the original configuration
is done via the socket interface. So store the modem status and reply
it when the socket has been converted to a TTY.

Signed-off-by: Denis Kenzior &lt;denis.kenzior@trolltech.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>[Bluetooth] Export details about authentication requirements</title>
<updated>2008-07-14T18:13:50Z</updated>
<author>
<name>Marcel Holtmann</name>
</author>
<published>2008-07-14T18:13:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=40be492fe4fab829951681860c2bb26fa1d5fe4a'/>
<id>urn:sha1:40be492fe4fab829951681860c2bb26fa1d5fe4a</id>
<content type='text'>
With the Simple Pairing support, the authentication requirements are
an explicit setting during the bonding process. Track and enforce the
requirements and allow higher layers like L2CAP and RFCOMM to increase
them if needed.

This patch introduces a new IOCTL that allows to query the current
authentication requirements. It is also possible to detect Simple
Pairing support in the kernel this way.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>[Bluetooth] Disconnect when encryption gets disabled</title>
<updated>2008-07-14T18:13:45Z</updated>
<author>
<name>Marcel Holtmann</name>
</author>
<published>2008-07-14T18:13:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9719f8afce34d3d04e884873a8a5e3483e30974c'/>
<id>urn:sha1:9719f8afce34d3d04e884873a8a5e3483e30974c</id>
<content type='text'>
The Bluetooth specification allows to enable or disable the encryption
of an ACL link at any time by either the peer or the remote device. If
a L2CAP or RFCOMM connection requested an encrypted link, they will now
disconnect that link if the encryption gets disabled. Higher protocols
that don't care about encryption (like SDP) are not affected.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>[Bluetooth] Enforce security for outgoing RFCOMM connections</title>
<updated>2008-07-14T18:13:45Z</updated>
<author>
<name>Marcel Holtmann</name>
</author>
<published>2008-07-14T18:13:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77db1980565626471a980f0d2d17299e4bd5e7a5'/>
<id>urn:sha1:77db1980565626471a980f0d2d17299e4bd5e7a5</id>
<content type='text'>
Recent tests with various Bluetooth headsets have shown that some of
them don't enforce authentication and encryption when connecting. All
of them leave it up to the host stack to enforce it. Non of them should
allow unencrypted connections, but that is how it is. So in case the
link mode settings require authentication and/or encryption it will now
also be enforced on outgoing RFCOMM connections. Previously this was
only done for incoming connections.

This support has a small drawback from a protocol level point of view
since the host stack can't really tell with 100% certainty if a remote
side is already authenticated or not. So if both sides are configured
to enforce authentication it will be requested twice. Most Bluetooth
chips are caching this information and thus no extra authentication
procedure has to be triggered over-the-air, but it can happen.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>net: remove CVS keywords</title>
<updated>2008-06-12T04:00:38Z</updated>
<author>
<name>Adrian Bunk</name>
</author>
<published>2008-06-11T05:46:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b040829952d84bf2a62526f0e24b624e0699447'/>
<id>urn:sha1:0b040829952d84bf2a62526f0e24b624e0699447</id>
<content type='text'>
This patch removes CVS keywords that weren't updated for a long time
from comments.

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bluetooth: fix locking bug in the rfcomm socket cleanup handling</title>
<updated>2008-05-29T08:32:47Z</updated>
<author>
<name>Arjan van de Ven</name>
</author>
<published>2008-05-29T08:32:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4c8411f8c115def968820a4df6658ccfd55d7f1a'/>
<id>urn:sha1:4c8411f8c115def968820a4df6658ccfd55d7f1a</id>
<content type='text'>
in net/bluetooth/rfcomm/sock.c, rfcomm_sk_state_change() does the
following operation:

        if (parent &amp;&amp; sock_flag(sk, SOCK_ZAPPED)) {
                /* We have to drop DLC lock here, otherwise
                 * rfcomm_sock_destruct() will dead lock. */
                rfcomm_dlc_unlock(d);
                rfcomm_sock_kill(sk);
                rfcomm_dlc_lock(d);
        }
}

which is fine, since rfcomm_sock_kill() will call sk_free() which will call
rfcomm_sock_destruct() which takes the rfcomm_dlc_lock()... so far so good.

HOWEVER, this assumes that the rfcomm_sk_state_change() function always gets
called with the rfcomm_dlc_lock() taken. This is the case for all but one
case, and in that case where we don't have the lock, we do a double unlock
followed by an attempt to take the lock, which due to underflow isn't
going anywhere fast.

This patch fixes this by moving the stragling case inside the lock, like
the other usages of the same call are doing in this code.

This was found with the help of the www.kerneloops.org project, where this
deadlock was observed 51 times at this point in time:
http://www.kerneloops.org/search.php?search=rfcomm_sock_destruct

Signed-off-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
