<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/bluetooth/rfcomm/core.c, branch linux-2.6.32.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.32.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.32.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2010-04-01T22:58:54Z</updated>
<entry>
<title>Bluetooth: Fix potential bad memory access with sysfs files</title>
<updated>2010-04-01T22:58:54Z</updated>
<author>
<name>Marcel Holtmann</name>
</author>
<published>2010-03-15T21:12:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e1c20f724d1f9f857dee1a13d0ecc11c4b834db7'/>
<id>urn:sha1:e1c20f724d1f9f857dee1a13d0ecc11c4b834db7</id>
<content type='text'>
commit 101545f6fef4a0a3ea8daf0b5b880df2c6a92a69 upstream.

When creating a high number of Bluetooth sockets (L2CAP, SCO
and RFCOMM) it is possible to scribble repeatedly on arbitrary
pages of memory. Ensure that the content of these sysfs files is
always less than one page. Even if this means truncating. The
files in question are scheduled to be moved over to debugfs in
the future anyway.

Based on initial patches from Neil Brown and Linus Torvalds

Reported-by: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Bluetooth: Fix sleeping function in RFCOMM within invalid context</title>
<updated>2010-04-01T22:58:10Z</updated>
<author>
<name>Marcel Holtmann</name>
</author>
<published>2010-02-03T23:52:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1020738fc1de56751c902c0f26eac5a61a0d9790'/>
<id>urn:sha1:1020738fc1de56751c902c0f26eac5a61a0d9790</id>
<content type='text'>
commit 485f1eff73a7b932fd3abb0dfcf804e1a1f59025 upstream.

With the commit 9e726b17422bade75fba94e625cd35fd1353e682 the
rfcomm_session_put() gets accidentially called from a timeout
callback and results in this:

BUG: sleeping function called from invalid context at net/core/sock.c:1897
in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper
Pid: 0, comm: swapper Tainted: P           2.6.32 #31
Call Trace:
 &lt;IRQ&gt;  [&lt;ffffffff81036455&gt;] __might_sleep+0xf8/0xfa
 [&lt;ffffffff8138ef1d&gt;] lock_sock_nested+0x29/0xc4
 [&lt;ffffffffa03921b3&gt;] lock_sock+0xb/0xd [l2cap]
 [&lt;ffffffffa03948e6&gt;] l2cap_sock_shutdown+0x1c/0x76 [l2cap]
 [&lt;ffffffff8106adea&gt;] ? clockevents_program_event+0x75/0x7e
 [&lt;ffffffff8106bea2&gt;] ? tick_dev_program_event+0x37/0xa5
 [&lt;ffffffffa0394967&gt;] l2cap_sock_release+0x27/0x67 [l2cap]
 [&lt;ffffffff8138c971&gt;] sock_release+0x1a/0x67
 [&lt;ffffffffa03d2492&gt;] rfcomm_session_del+0x34/0x53 [rfcomm]
 [&lt;ffffffffa03d24c5&gt;] rfcomm_session_put+0x14/0x16 [rfcomm]
 [&lt;ffffffffa03d28b4&gt;] rfcomm_session_timeout+0xe/0x1a [rfcomm]
 [&lt;ffffffff810554a8&gt;] run_timer_softirq+0x1e2/0x29a
 [&lt;ffffffffa03d28a6&gt;] ? rfcomm_session_timeout+0x0/0x1a [rfcomm]
 [&lt;ffffffff8104e0f6&gt;] __do_softirq+0xfe/0x1c5
 [&lt;ffffffff8100e8ce&gt;] ? timer_interrupt+0x1a/0x21
 [&lt;ffffffff8100cc4c&gt;] call_softirq+0x1c/0x28
 [&lt;ffffffff8100e05b&gt;] do_softirq+0x33/0x6b
 [&lt;ffffffff8104daf6&gt;] irq_exit+0x36/0x85
 [&lt;ffffffff8100d7a9&gt;] do_IRQ+0xa6/0xbd
 [&lt;ffffffff8100c493&gt;] ret_from_intr+0x0/0xa
 &lt;EOI&gt;  [&lt;ffffffff812585b3&gt;] ? acpi_idle_enter_bm+0x269/0x294
 [&lt;ffffffff812585a9&gt;] ? acpi_idle_enter_bm+0x25f/0x294
 [&lt;ffffffff81373ddc&gt;] ? cpuidle_idle_call+0x97/0x107
 [&lt;ffffffff8100aca0&gt;] ? cpu_idle+0x53/0xaa
 [&lt;ffffffff81429006&gt;] ? rest_init+0x7a/0x7c
 [&lt;ffffffff8177bc8c&gt;] ? start_kernel+0x389/0x394
 [&lt;ffffffff8177b29c&gt;] ? x86_64_start_reservations+0xac/0xb0
 [&lt;ffffffff8177b384&gt;] ? x86_64_start_kernel+0xe4/0xeb

To fix this, the rfcomm_session_put() needs to be moved out of
rfcomm_session_timeout() into rfcomm_process_sessions(). In that
context it is perfectly fine to sleep and disconnect the socket.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Tested-by: David John &lt;davidjon@xenontk.org&gt;
Cc: Chase Douglas &lt;chase.douglas@canonical.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Bluetooth: Fix rejected connection not disconnecting ACL link</title>
<updated>2009-08-22T22:05:58Z</updated>
<author>
<name>Luiz Augusto von Dentz</name>
</author>
<published>2009-07-15T16:50:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e726b17422bade75fba94e625cd35fd1353e682'/>
<id>urn:sha1:9e726b17422bade75fba94e625cd35fd1353e682</id>
<content type='text'>
When using DEFER_SETUP on a RFCOMM socket, a SABM frame triggers
authorization which when rejected send a DM response. This is fine
according to the RFCOMM spec:

    the responding implementation may replace the "proper" response
    on the Multiplexer Control channel with a DM frame, sent on the
    referenced DLCI to indicate that the DLCI is not open, and that
    the responder would not grant a request to open it later either.

But some stacks doesn't seems to cope with this leaving DLCI 0 open after
receiving DM frame.

To fix it properly a timer was introduced to rfcomm_session which is used
to set a timeout when the last active DLC of a session is unlinked, this
will give the remote stack some time to reply with a proper DISC frame on
DLCI 0 avoiding both sides sending DISC to each other on stacks that
follow the specification and taking care of those who don't by taking
down DLCI 0.

Signed-off-by: Luiz Augusto von Dentz &lt;luiz.dentz@openbossa.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Coding style cleanup from previous rfcomm_init bug fix</title>
<updated>2009-08-22T21:49:36Z</updated>
<author>
<name>Marcel Holtmann</name>
</author>
<published>2009-08-22T21:49:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=52d18347dfb61519aa0f58fe1759edd3ad8c4e36'/>
<id>urn:sha1:52d18347dfb61519aa0f58fe1759edd3ad8c4e36</id>
<content type='text'>
The rfcomm_init bug fix went into the kernel premature before it got fully
reviewed and acknowledged by the Bluetooth maintainer. So fix up the coding
style now.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>bluetooth: rfcomm_init bug fix</title>
<updated>2009-08-03T20:24:39Z</updated>
<author>
<name>Dave Young</name>
</author>
<published>2009-08-03T04:26:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=af0d3b103bcfa877343ee338de12002cd50c9ee5'/>
<id>urn:sha1:af0d3b103bcfa877343ee338de12002cd50c9ee5</id>
<content type='text'>
rfcomm tty may be used before rfcomm_tty_driver initilized,
The problem is that now socket layer init before tty layer, if userspace
program do socket callback right here then oops will happen.

reporting in:
http://marc.info/?l=linux-bluetooth&amp;m=124404919324542&amp;w=2

make 3 changes:
1. remove #ifdef in rfcomm/core.c,
make it blank function when rfcomm tty not selected in rfcomm.h

2. tune the rfcomm_init error patch to ensure
tty driver initilized before rfcomm socket usage.

3. remove __exit for rfcomm_cleanup_sockets
because above change need call it in a __init function.

Reported-by: Oliver Hartkopp &lt;oliver@hartkopp.net&gt;
Tested-by: Oliver Hartkopp &lt;oliver@hartkopp.net&gt;
Signed-off-by: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Remove pointless endian conversion helpers</title>
<updated>2009-06-08T12:50:01Z</updated>
<author>
<name>Marcel Holtmann</name>
</author>
<published>2009-06-07T16:06:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b4324b5dc5b62ba76372e1bf8927230cf744df66'/>
<id>urn:sha1:b4324b5dc5b62ba76372e1bf8927230cf744df66</id>
<content type='text'>
The Bluetooth source uses some endian conversion helpers, that in the end
translate to kernel standard routines. So remove this obfuscation since it
is fully pointless.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix removing of RFCOMM DLC timer with DEFER_SETUP</title>
<updated>2009-04-19T16:56:45Z</updated>
<author>
<name>Johan Hedberg</name>
</author>
<published>2009-03-26T14:41:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e2139b32726e5dd184974c785ea3f62026590801'/>
<id>urn:sha1:e2139b32726e5dd184974c785ea3f62026590801</id>
<content type='text'>
There is a missing call to rfcomm_dlc_clear_timer in the case that
DEFER_SETUP is used and so the connection gets disconnected after the
timeout even if it was successfully accepted previously.

This patch adds a call to rfcomm_dlc_clear_timer to rfcomm_dlc_accept
which will get called when the user accepts the connection by calling
read() on the socket.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@nokia.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix RFCOMM usage of in-kernel L2CAP sockets</title>
<updated>2009-02-27T05:14:48Z</updated>
<author>
<name>Marcel Holtmann</name>
</author>
<published>2009-02-17T20:49:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=37e62f5516cfb210e64fe53457932df4341b0ad1'/>
<id>urn:sha1:37e62f5516cfb210e64fe53457932df4341b0ad1</id>
<content type='text'>
The CID value of L2CAP sockets need to be set to zero. All userspace
applications do this via memset() on the sockaddr_l2 structure. The
RFCOMM implementation uses in-kernel L2CAP sockets and so it has to
make sure that l2_cid is set to zero.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Change RFCOMM to use BT_CONNECT2 for BT_DEFER_SETUP</title>
<updated>2009-02-27T05:14:47Z</updated>
<author>
<name>Marcel Holtmann</name>
</author>
<published>2009-02-16T01:59:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8bf4794174659b06d43cc5e290cd384757374613'/>
<id>urn:sha1:8bf4794174659b06d43cc5e290cd384757374613</id>
<content type='text'>
When BT_DEFER_SETUP is enabled on a RFCOMM socket, then switch its
current state from BT_OPEN to BT_CONNECT2. This gives the Bluetooth
core a unified way to handle L2CAP and RFCOMM sockets. The BT_CONNECT2
state is designated for incoming connections.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Use general bonding whenever possible</title>
<updated>2009-02-27T05:14:40Z</updated>
<author>
<name>Marcel Holtmann</name>
</author>
<published>2009-02-09T01:48:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0684e5f9fb9e3f7e168ab831dfca693bcb44805b'/>
<id>urn:sha1:0684e5f9fb9e3f7e168ab831dfca693bcb44805b</id>
<content type='text'>
When receiving incoming connection to specific services, always use
general bonding. This ensures that the link key gets stored and can be
used for further authentications.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
</feed>
