<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/bluetooth, branch v3.8</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.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2013-01-31T17:38:02Z</updated>
<entry>
<title>Bluetooth: Fix hci_conn timeout routine</title>
<updated>2013-01-31T17:38:02Z</updated>
<author>
<name>Andre Guedes</name>
<email>andre.guedes@openbossa.org</email>
</author>
<published>2013-01-30T14:50:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4c02e2d444595200d0b18b889994aac3611cd288'/>
<id>urn:sha1:4c02e2d444595200d0b18b889994aac3611cd288</id>
<content type='text'>
If occurs a LE or SCO hci_conn timeout and the connection is already
established (BT_CONNECTED state), the connection is not terminated as
expected. This bug can be reproduced using l2test or scotest tool.
Once the connection is established, kill l2test/scotest and the
connection won't be terminated.

This patch fixes hci_conn_disconnect helper so it is able to
terminate LE and SCO connections, as well as ACL.

Signed-off-by: Andre Guedes &lt;andre.guedes@openbossa.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix handling of unexpected SMP PDUs</title>
<updated>2013-01-31T17:35:42Z</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2013-01-29T16:44:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8cf9fa1240229cbdd888236c0c43fcbad680cf00'/>
<id>urn:sha1:8cf9fa1240229cbdd888236c0c43fcbad680cf00</id>
<content type='text'>
The conn-&gt;smp_chan pointer can be NULL if SMP PDUs arrive at unexpected
moments. To avoid NULL pointer dereferences the code should be checking
for this and disconnect if an unexpected SMP PDU arrives. This patch
fixes the issue by adding a check for conn-&gt;smp_chan for all other PDUs
except pairing request and security request (which are are the first
PDUs to come to initialize the SMP context).

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
CC: stable@vger.kernel.org
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Check if the hci connection exists in SCO shutdown</title>
<updated>2013-01-10T05:53:32Z</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.co.uk</email>
</author>
<published>2013-01-03T21:59:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b7e98b5100aad9290d7f06fcb9d1e80f7f62f05f'/>
<id>urn:sha1:b7e98b5100aad9290d7f06fcb9d1e80f7f62f05f</id>
<content type='text'>
Checking only for sco_conn seems to not be enough and lead to NULL
dereferences in the code, check for hcon instead.

&lt;1&gt;[11340.226404] BUG: unable to handle kernel NULL pointer dereference at
0000000
8
&lt;4&gt;[11340.226619] EIP is at __sco_sock_close+0xe8/0x1a0
&lt;4&gt;[11340.226629] EAX: f063a740 EBX: 00000000 ECX: f58f4544 EDX: 00000000
&lt;4&gt;[11340.226640] ESI: dec83e00 EDI: 5f9a081f EBP: e0fdff38 ESP: e0fdff1c
&lt;0&gt;[11340.226674] Stack:
&lt;4&gt;[11340.226682]  c184db87 c1251028 dec83e00 e0fdff38 c1754aef dec83e00
00000000
e0fdff5c
&lt;4&gt;[11340.226718]  c184f587 e0fdff64 e0fdff68 5f9a081f e0fdff5c c1751852
d7813800
62262f10
&lt;4&gt;[11340.226752]  e0fdff70 c1753c00 00000000 00000001 0000000d e0fdffac
c175425c
00000041
&lt;0&gt;[11340.226793] Call Trace:
&lt;4&gt;[11340.226813]  [&lt;c184db87&gt;] ? sco_sock_clear_timer+0x27/0x60
&lt;4&gt;[11340.226831]  [&lt;c1251028&gt;] ? local_bh_enable+0x68/0xd0
&lt;4&gt;[11340.226846]  [&lt;c1754aef&gt;] ? lock_sock_nested+0x4f/0x60
&lt;4&gt;[11340.226862]  [&lt;c184f587&gt;] sco_sock_shutdown+0x67/0xb0
&lt;4&gt;[11340.226879]  [&lt;c1751852&gt;] ? sockfd_lookup_light+0x22/0x80
&lt;4&gt;[11340.226897]  [&lt;c1753c00&gt;] sys_shutdown+0x30/0x60
&lt;4&gt;[11340.226912]  [&lt;c175425c&gt;] sys_socketcall+0x1dc/0x2a0
&lt;4&gt;[11340.226929]  [&lt;c149ba78&gt;] ? trace_hardirqs_on_thunk+0xc/0x10
&lt;4&gt;[11340.226944]  [&lt;c18860f1&gt;] syscall_call+0x7/0xb
&lt;4&gt;[11340.226960]  [&lt;c1880000&gt;] ? restore_cur+0x5e/0xd7
&lt;0&gt;[11340.226969] Code: &lt;f0&gt; ff 4b 08 0f 94 c0 84 c0 74 20 80 7b 19 01 74
2f b8 0a 00 00

Reported-by: Chuansheng Liu &lt;chuansheng.liu@intel.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix authentication if acl data comes before remote feature evt</title>
<updated>2013-01-10T05:26:18Z</updated>
<author>
<name>Jaganath Kanakkassery</name>
<email>jaganath.k@samsung.com</email>
</author>
<published>2013-01-10T04:58:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7b064edae38d62d8587a8c574f93b53ce75ae749'/>
<id>urn:sha1:7b064edae38d62d8587a8c574f93b53ce75ae749</id>
<content type='text'>
If remote device sends l2cap info request before read_remote_ext_feature
completes then mgmt_connected will be sent in hci_acldata_packet() and
remote name request wont be sent and eventually authentication wont happen

Hcidump log of the issue

&lt; HCI Command: Create Connection (0x01|0x0005) plen 13
    bdaddr BC:85:1F:74:7F:29 ptype 0xcc18 rswitch 0x01 clkoffset 0x4bf7 (valid)
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5
&gt; HCI Event: Command Status (0x0f) plen 4
    Create Connection (0x01|0x0005) status 0x00 ncmd 1
&gt; HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 12 bdaddr BC:85:1F:74:7F:29 type ACL encrypt 0x00
&lt; HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
    handle 12
&gt; HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
&gt; HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 12
    Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
&gt; HCI Event: Max Slots Change (0x1b) plen 3
    handle 12 slots 5
&lt; HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3
    handle 12 page 1
&gt; HCI Event: Command Status (0x0f) plen 4
    Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
&gt; ACL data: handle 12 flags 0x02 dlen 10
    L2CAP(s): Info req: type 2
&lt; ACL data: handle 12 flags 0x00 dlen 16
    L2CAP(s): Info rsp: type 2 result 0
      Extended feature mask 0x00b8
        Enhanced Retransmission mode
        Streaming mode
        FCS Option
        Fixed Channels
&gt; HCI Event: Read Remote Extended Features (0x23) plen 13
    status 0x00 handle 12 page 1 max 1
    Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
&gt; ACL data: handle 12 flags 0x02 dlen 10
    L2CAP(s): Info req: type 3
&lt; ACL data: handle 12 flags 0x00 dlen 20
    L2CAP(s): Info rsp: type 3 result 0
      Fixed channel list 0x00000002
        L2CAP Signalling Channel
&gt; HCI Event: Number of Completed Packets (0x13) plen 5
    handle 12 packets 2

This patch moves sending mgmt_connected from hci_acldata_packet() to
l2cap_connect_req() since this code is to handle the scenario remote
device sends l2cap connect req too fast

Signed-off-by: Jaganath Kanakkassery &lt;jaganath.k@samsung.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix incorrect strncpy() in hidp_setup_hid()</title>
<updated>2013-01-09T19:39:05Z</updated>
<author>
<name>Anderson Lizardo</name>
<email>anderson.lizardo@openbossa.org</email>
</author>
<published>2013-01-06T22:28:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0a9ab9bdb3e891762553f667066190c1d22ad62b'/>
<id>urn:sha1:0a9ab9bdb3e891762553f667066190c1d22ad62b</id>
<content type='text'>
The length parameter should be sizeof(req-&gt;name) - 1 because there is no
guarantee that string provided by userspace will contain the trailing
'\0'.

Can be easily reproduced by manually setting req-&gt;name to 128 non-zero
bytes prior to ioctl(HIDPCONNADD) and checking the device name setup on
input subsystem:

$ cat /sys/devices/pnp0/00\:04/tty/ttyS0/hci0/hci0\:1/input8/name
AAAAAA[...]AAAAAAAAf0:af:f0:af:f0:af

("f0:af:f0:af:f0:af" is the device bluetooth address, taken from "phys"
field in struct hid_device due to overflow.)

Cc: stable@vger.kernel.org
Signed-off-by: Anderson Lizardo &lt;anderson.lizardo@openbossa.org&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix sending HCI commands after reset</title>
<updated>2013-01-09T19:05:14Z</updated>
<author>
<name>Szymon Janc</name>
<email>szymon.janc@tieto.com</email>
</author>
<published>2012-12-11T07:51:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dbccd791a3fbbdac12c33834b73beff3984988e9'/>
<id>urn:sha1:dbccd791a3fbbdac12c33834b73beff3984988e9</id>
<content type='text'>
After sending reset command wait for its command complete event before
sending next command. Some chips sends CC event for command received
before reset if reset was send before chip replied with CC.

This is also required by specification that host shall not send
additional HCI commands before receiving CC for reset.

&lt; HCI Command: Reset (0x03|0x0003) plen 0                              [hci0] 18.404612
&gt; HCI Event: Command Complete (0x0e) plen 4                            [hci0] 18.405850
      Write Extended Inquiry Response (0x03|0x0052) ncmd 1
        Status: Success (0x00)
&lt; HCI Command: Read Local Supported Features (0x04|0x0003) plen 0      [hci0] 18.406079
&gt; HCI Event: Command Complete (0x0e) plen 4                            [hci0] 18.407864
      Reset (0x03|0x0003) ncmd 1
        Status: Success (0x00)
&lt; HCI Command: Read Local Supported Features (0x04|0x0003) plen 0      [hci0] 18.408062
&gt; HCI Event: Command Complete (0x0e) plen 12                           [hci0] 18.408835

Signed-off-by: Szymon Janc &lt;szymon.janc@tieto.com&gt;
Cc: stable@vger.kernel.org
Acked-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid</title>
<updated>2012-12-13T20:00:48Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-12-13T20:00:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fd62c5450324af7f6cc12897b09b77285cd48a92'/>
<id>urn:sha1:fd62c5450324af7f6cc12897b09b77285cd48a92</id>
<content type='text'>
Pull HID subsystem updates from Jiri Kosina:

 1) Support for HID over I2C bus has been added by Benjamin Tissoires.
    ACPI device discovery is still in the works.

 2) Support for Win8 Multitiouch protocol is being added, most work done
    by Benjamin Tissoires as well

 3) EIO/ERESTARTSYS is fixed in hiddev/hidraw, fixes by Andrew Duggan
    and Jiri Kosina

 4) ION iCade driver added by Bastien Nocera

 5) Support for a couple new Roccat devices has been added by Stefan
    Achatz

 6) HID sensor hubs are now auto-detected instead of having to list all
    the VID/PID combinations in the blacklist array

 7) other random fixes and support for new device IDs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (65 commits)
  HID: i2c-hid: add mutex protecting open/close race
  Revert "HID: sensors: add to special driver list"
  HID: sensors: autodetect USB HID sensor hubs
  HID: hidp: fallback to input session properly if hid is blacklisted
  HID: i2c-hid: fix ret_count check
  HID: i2c-hid: fix i2c_hid_get_raw_report count mismatches
  HID: i2c-hid: remove extra .irq field in struct i2c_hid
  HID: i2c-hid: reorder allocation/free of buffers
  HID: i2c-hid: fix memory corruption due to missing hid declaration
  HID: i2c-hid: remove superfluous include
  HID: i2c-hid: remove unneeded test in i2c_hid_remove
  HID: i2c-hid: i2c_hid_get_report may fail
  HID: i2c-hid: also call i2c_hid_free_buffers in i2c_hid_remove
  HID: i2c-hid: fix error messages
  HID: i2c-hid: fix return paths
  HID: i2c-hid: remove unused static declarations
  HID: i2c-hid: fix i2c_hid_dbg macro
  HID: i2c-hid: fix checkpatch.pl warning
  HID: i2c-hid: enhance Kconfig
  HID: i2c-hid: change I2C name
  ...
</content>
</entry>
<entry>
<title>Merge branches 'for-3.7/upstream-fixes', 'for-3.8/hidraw', 'for-3.8/i2c-hid', 'for-3.8/multitouch', 'for-3.8/roccat', 'for-3.8/sensors' and 'for-3.8/upstream' into for-linus</title>
<updated>2012-12-12T20:41:55Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2012-12-12T20:41:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=818b930bc15077fc00ff16bb22c5df1857f05afa'/>
<id>urn:sha1:818b930bc15077fc00ff16bb22c5df1857f05afa</id>
<content type='text'>
Conflicts:
	drivers/hid/hid-core.c
</content>
</entry>
<entry>
<title>HID: hidp: fallback to input session properly if hid is blacklisted</title>
<updated>2012-12-07T10:12:27Z</updated>
<author>
<name>Lamarque V. Souza</name>
<email>lamarque@gmail.com</email>
</author>
<published>2012-12-06T14:39:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4529eefad087f97b33c0f31984d924b1f15d7bae'/>
<id>urn:sha1:4529eefad087f97b33c0f31984d924b1f15d7bae</id>
<content type='text'>
This patch against kernel 3.7.0-rc8 fixes a kernel oops when turning on the
bluetooth mouse with id 0458:0058 [1].

The mouse in question supports both input and hid sessions, however it is
blacklisted in drivers/hid/hid-core.c so the input session is one that should
be used. Long ago (around kernel 3.0.0) some changes in the bluetooth
subsystem made the kernel do not fallback to input session when hid session is
not supported or blacklisted. This patch restore that behaviour by making the
kernel try the input session if hid_add_device returns ENODEV.

The patch exports hid_ignore() from hid-core.c so that it can be used in the
bluetooth subsystem.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=39882

Signed-off-by: Lamarque V. Souza &lt;lamarque@gmail.com&gt;
Acked-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next</title>
<updated>2012-12-03T18:46:03Z</updated>
<author>
<name>John W. Linville</name>
<email>linville@tuxdriver.com</email>
</author>
<published>2012-12-03T18:46:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=06ef5c4bbb9816e7a7eb44917f11c2e3375fb51a'/>
<id>urn:sha1:06ef5c4bbb9816e7a7eb44917f11c2e3375fb51a</id>
<content type='text'>
</content>
</entry>
</feed>
