<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/bluetooth, branch v3.9</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/bluetooth?h=v3.9</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/bluetooth?h=v3.9'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-04-07T20:28:01Z</updated>
<entry>
<title>Bluetooth: SCO - Fix missing msg_namelen update in sco_sock_recvmsg()</title>
<updated>2013-04-07T20:28:01Z</updated>
<author>
<name>Mathias Krause</name>
<email>minipli@googlemail.com</email>
</author>
<published>2013-04-07T01:51:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c8c499175f7d295ef867335bceb9a76a2c3cdc38'/>
<id>urn:sha1:c8c499175f7d295ef867335bceb9a76a2c3cdc38</id>
<content type='text'>
If the socket is in state BT_CONNECT2 and BT_SK_DEFER_SETUP is set in
the flags, sco_sock_recvmsg() returns early with 0 without updating the
possibly set msg_namelen member. This, in turn, leads to a 128 byte
kernel stack leak in net/socket.c.

Fix this by updating msg_namelen in this case. For all other cases it
will be handled in bt_sock_recvmsg().

Cc: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: Johan Hedberg &lt;johan.hedberg@gmail.com&gt;
Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Bluetooth: RFCOMM - Fix missing msg_namelen update in rfcomm_sock_recvmsg()</title>
<updated>2013-04-07T20:28:00Z</updated>
<author>
<name>Mathias Krause</name>
<email>minipli@googlemail.com</email>
</author>
<published>2013-04-07T01:51:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e11e0455c0d7d3d62276a0c55d9dfbc16779d691'/>
<id>urn:sha1:e11e0455c0d7d3d62276a0c55d9dfbc16779d691</id>
<content type='text'>
If RFCOMM_DEFER_SETUP is set in the flags, rfcomm_sock_recvmsg() returns
early with 0 without updating the possibly set msg_namelen member. This,
in turn, leads to a 128 byte kernel stack leak in net/socket.c.

Fix this by updating msg_namelen in this case. For all other cases it
will be handled in bt_sock_stream_recvmsg().

Cc: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: Johan Hedberg &lt;johan.hedberg@gmail.com&gt;
Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Bluetooth: fix possible info leak in bt_sock_recvmsg()</title>
<updated>2013-04-07T20:28:00Z</updated>
<author>
<name>Mathias Krause</name>
<email>minipli@googlemail.com</email>
</author>
<published>2013-04-07T01:51:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4683f42fde3977bdb4e8a09622788cc8b5313778'/>
<id>urn:sha1:4683f42fde3977bdb4e8a09622788cc8b5313778</id>
<content type='text'>
In case the socket is already shutting down, bt_sock_recvmsg() returns
with 0 without updating msg_namelen leading to net/socket.c leaking the
local, uninitialized sockaddr_storage variable to userland -- 128 bytes
of kernel stack memory.

Fix this by moving the msg_namelen assignment in front of the shutdown
test.

Cc: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: Johan Hedberg &lt;johan.hedberg@gmail.com&gt;
Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth</title>
<updated>2013-03-18T19:17:11Z</updated>
<author>
<name>John W. Linville</name>
<email>linville@tuxdriver.com</email>
</author>
<published>2013-03-18T19:17:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8fa48cbdfb0b7c2e39a8f2a46f987afe9b9c0579'/>
<id>urn:sha1:8fa48cbdfb0b7c2e39a8f2a46f987afe9b9c0579</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Bluetooth: Fix not closing SCO sockets in the BT_CONNECT2 state</title>
<updated>2013-03-14T16:14:21Z</updated>
<author>
<name>Vinicius Costa Gomes</name>
<email>vinicius.gomes@openbossa.org</email>
</author>
<published>2013-03-13T22:46:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eb20ff9c91ddcb2d55c1849a87d3db85af5e88a9'/>
<id>urn:sha1:eb20ff9c91ddcb2d55c1849a87d3db85af5e88a9</id>
<content type='text'>
With deferred setup for SCO, it is possible that userspace closes the
socket when it is in the BT_CONNECT2 state, after the Connect Request is
received but before the Accept Synchonous Connection is sent.

If this happens the following crash was observed, when the connection is
terminated:

[  +0.000003] hci_sync_conn_complete_evt: hci0 status 0x10
[  +0.000005] sco_connect_cfm: hcon ffff88003d1bd800 bdaddr 40:98:4e:32:d7:39 status 16
[  +0.000003] sco_conn_del: hcon ffff88003d1bd800 conn ffff88003cc8e300, err 110
[  +0.000015] BUG: unable to handle kernel NULL pointer dereference at 0000000000000199
[  +0.000906] IP: [&lt;ffffffff810620dd&gt;] __lock_acquire+0xed/0xe82
[  +0.000000] PGD 3d21f067 PUD 3d291067 PMD 0
[  +0.000000] Oops: 0002 [#1] SMP
[  +0.000000] Modules linked in: rfcomm bnep btusb bluetooth
[  +0.000000] CPU 0
[  +0.000000] Pid: 1481, comm: kworker/u:2H Not tainted 3.9.0-rc1-25019-gad82cdd #1 Bochs Bochs
[  +0.000000] RIP: 0010:[&lt;ffffffff810620dd&gt;]  [&lt;ffffffff810620dd&gt;] __lock_acquire+0xed/0xe82
[  +0.000000] RSP: 0018:ffff88003c3c19d8  EFLAGS: 00010002
[  +0.000000] RAX: 0000000000000001 RBX: 0000000000000246 RCX: 0000000000000000
[  +0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88003d1be868
[  +0.000000] RBP: ffff88003c3c1a98 R08: 0000000000000002 R09: 0000000000000000
[  +0.000000] R10: ffff88003d1be868 R11: ffff88003e20b000 R12: 0000000000000002
[  +0.000000] R13: ffff88003aaa8000 R14: 000000000000006e R15: ffff88003d1be850
[  +0.000000] FS:  0000000000000000(0000) GS:ffff88003e200000(0000) knlGS:0000000000000000
[  +0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  +0.000000] CR2: 0000000000000199 CR3: 000000003c1cb000 CR4: 00000000000006b0
[  +0.000000] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  +0.000000] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[  +0.000000] Process kworker/u:2H (pid: 1481, threadinfo ffff88003c3c0000, task ffff88003aaa8000)
[  +0.000000] Stack:
[  +0.000000]  ffffffff81b16342 0000000000000000 0000000000000000 ffff88003d1be868
[  +0.000000]  ffffffff00000000 00018c0c7863e367 000000003c3c1a28 ffffffff8101efbd
[  +0.000000]  0000000000000000 ffff88003e3d2400 ffff88003c3c1a38 ffffffff81007c7a
[  +0.000000] Call Trace:
[  +0.000000]  [&lt;ffffffff8101efbd&gt;] ? kvm_clock_read+0x34/0x3b
[  +0.000000]  [&lt;ffffffff81007c7a&gt;] ? paravirt_sched_clock+0x9/0xd
[  +0.000000]  [&lt;ffffffff81007fd4&gt;] ? sched_clock+0x9/0xb
[  +0.000000]  [&lt;ffffffff8104fd7a&gt;] ? sched_clock_local+0x12/0x75
[  +0.000000]  [&lt;ffffffff810632d1&gt;] lock_acquire+0x93/0xb1
[  +0.000000]  [&lt;ffffffffa0022339&gt;] ? spin_lock+0x9/0xb [bluetooth]
[  +0.000000]  [&lt;ffffffff8105f3d8&gt;] ? lock_release_holdtime.part.22+0x4e/0x55
[  +0.000000]  [&lt;ffffffff814f6038&gt;] _raw_spin_lock+0x40/0x74
[  +0.000000]  [&lt;ffffffffa0022339&gt;] ? spin_lock+0x9/0xb [bluetooth]
[  +0.000000]  [&lt;ffffffff814f6936&gt;] ? _raw_spin_unlock+0x23/0x36
[  +0.000000]  [&lt;ffffffffa0022339&gt;] spin_lock+0x9/0xb [bluetooth]
[  +0.000000]  [&lt;ffffffffa00230cc&gt;] sco_conn_del+0x76/0xbb [bluetooth]
[  +0.000000]  [&lt;ffffffffa002391d&gt;] sco_connect_cfm+0x2da/0x2e9 [bluetooth]
[  +0.000000]  [&lt;ffffffffa000862a&gt;] hci_proto_connect_cfm+0x38/0x65 [bluetooth]
[  +0.000000]  [&lt;ffffffffa0008d30&gt;] hci_sync_conn_complete_evt.isra.79+0x11a/0x13e [bluetooth]
[  +0.000000]  [&lt;ffffffffa000cd96&gt;] hci_event_packet+0x153b/0x239d [bluetooth]
[  +0.000000]  [&lt;ffffffff814f68ff&gt;] ? _raw_spin_unlock_irqrestore+0x48/0x5c
[  +0.000000]  [&lt;ffffffffa00025f6&gt;] hci_rx_work+0xf3/0x2e3 [bluetooth]
[  +0.000000]  [&lt;ffffffff8103efed&gt;] process_one_work+0x1dc/0x30b
[  +0.000000]  [&lt;ffffffff8103ef83&gt;] ? process_one_work+0x172/0x30b
[  +0.000000]  [&lt;ffffffff8103e07f&gt;] ? spin_lock_irq+0x9/0xb
[  +0.000000]  [&lt;ffffffff8103fc8d&gt;] worker_thread+0x123/0x1d2
[  +0.000000]  [&lt;ffffffff8103fb6a&gt;] ? manage_workers+0x240/0x240
[  +0.000000]  [&lt;ffffffff81044211&gt;] kthread+0x9d/0xa5
[  +0.000000]  [&lt;ffffffff81044174&gt;] ? __kthread_parkme+0x60/0x60
[  +0.000000]  [&lt;ffffffff814f75bc&gt;] ret_from_fork+0x7c/0xb0
[  +0.000000]  [&lt;ffffffff81044174&gt;] ? __kthread_parkme+0x60/0x60
[  +0.000000] Code: d7 44 89 8d 50 ff ff ff 4c 89 95 58 ff ff ff e8 44 fc ff ff 44 8b 8d 50 ff ff ff 48 85 c0 4c 8b 95 58 ff ff ff 0f 84 7a 04 00 00 &lt;f0&gt; ff 80 98 01 00 00 83 3d 25 41 a7 00 00 45 8b b5 e8 05 00 00
[  +0.000000] RIP  [&lt;ffffffff810620dd&gt;] __lock_acquire+0xed/0xe82
[  +0.000000]  RSP &lt;ffff88003c3c19d8&gt;
[  +0.000000] CR2: 0000000000000199
[  +0.000000] ---[ end trace e73cd3b52352dd34 ]---

Cc: stable@vger.kernel.org [3.8]
Signed-off-by: Vinicius Costa Gomes &lt;vinicius.gomes@openbossa.org&gt;
Tested-by: Frederic Dalleau &lt;frederic.dalleau@intel.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>hlist: drop the node parameter from iterators</title>
<updated>2013-02-28T03:10:24Z</updated>
<author>
<name>Sasha Levin</name>
<email>sasha.levin@oracle.com</email>
</author>
<published>2013-02-28T01:06:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b67bfe0d42cac56c512dd5da4b1b347a23f4b70a'/>
<id>urn:sha1:b67bfe0d42cac56c512dd5da4b1b347a23f4b70a</id>
<content type='text'>
I'm not sure why, but the hlist for each entry iterators were conceived

        list_for_each_entry(pos, head, member)

The hlist ones were greedy and wanted an extra parameter:

        hlist_for_each_entry(tpos, pos, head, member)

Why did they need an extra pos parameter? I'm not quite sure. Not only
they don't really need it, it also prevents the iterator from looking
exactly like the list iterator, which is unfortunate.

Besides the semantic patch, there was some manual work required:

 - Fix up the actual hlist iterators in linux/list.h
 - Fix up the declaration of other iterators based on the hlist ones.
 - A very small amount of places were using the 'node' parameter, this
 was modified to use 'obj-&gt;member' instead.
 - Coccinelle didn't handle the hlist_for_each_entry_safe iterator
 properly, so those had to be fixed up manually.

The semantic patch which is mostly the work of Peter Senna Tschudin is here:

@@
iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host;

type T;
expression a,c,d,e;
identifier b;
statement S;
@@

-T b;
    &lt;+... when != b
(
hlist_for_each_entry(a,
- b,
c, d) S
|
hlist_for_each_entry_continue(a,
- b,
c) S
|
hlist_for_each_entry_from(a,
- b,
c) S
|
hlist_for_each_entry_rcu(a,
- b,
c, d) S
|
hlist_for_each_entry_rcu_bh(a,
- b,
c, d) S
|
hlist_for_each_entry_continue_rcu_bh(a,
- b,
c) S
|
for_each_busy_worker(a, c,
- b,
d) S
|
ax25_uid_for_each(a,
- b,
c) S
|
ax25_for_each(a,
- b,
c) S
|
inet_bind_bucket_for_each(a,
- b,
c) S
|
sctp_for_each_hentry(a,
- b,
c) S
|
sk_for_each(a,
- b,
c) S
|
sk_for_each_rcu(a,
- b,
c) S
|
sk_for_each_from
-(a, b)
+(a)
S
+ sk_for_each_from(a) S
|
sk_for_each_safe(a,
- b,
c, d) S
|
sk_for_each_bound(a,
- b,
c) S
|
hlist_for_each_entry_safe(a,
- b,
c, d, e) S
|
hlist_for_each_entry_continue_rcu(a,
- b,
c) S
|
nr_neigh_for_each(a,
- b,
c) S
|
nr_neigh_for_each_safe(a,
- b,
c, d) S
|
nr_node_for_each(a,
- b,
c) S
|
nr_node_for_each_safe(a,
- b,
c, d) S
|
- for_each_gfn_sp(a, c, d, b) S
+ for_each_gfn_sp(a, c, d) S
|
- for_each_gfn_indirect_valid_sp(a, c, d, b) S
+ for_each_gfn_indirect_valid_sp(a, c, d) S
|
for_each_host(a,
- b,
c) S
|
for_each_host_safe(a,
- b,
c, d) S
|
for_each_mesh_entry(a,
- b,
c, d) S
)
    ...+&gt;

[akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c]
[akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c]
[akpm@linux-foundation.org: checkpatch fixes]
[akpm@linux-foundation.org: fix warnings]
[akpm@linux-foudnation.org: redo intrusive kvm changes]
Tested-by: Peter Senna Tschudin &lt;peter.senna@gmail.com&gt;
Acked-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Cc: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Cc: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Cc: Gleb Natapov &lt;gleb@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial</title>
<updated>2013-02-22T01:40:58Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-02-22T01:40:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9afa3195b96da7d2320ec44d19fbfbded7a15571'/>
<id>urn:sha1:9afa3195b96da7d2320ec44d19fbfbded7a15571</id>
<content type='text'>
Pull trivial tree from Jiri Kosina:
 "Assorted tiny fixes queued in trivial tree"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (22 commits)
  DocBook: update EXPORT_SYMBOL entry to point at export.h
  Documentation: update top level 00-INDEX file with new additions
  ARM: at91/ide: remove unsused at91-ide Kconfig entry
  percpu_counter.h: comment code for better readability
  x86, efi: fix comment typo in head_32.S
  IB: cxgb3: delay freeing mem untill entirely done with it
  net: mvneta: remove unneeded version.h include
  time: x86: report_lost_ticks doesn't exist any more
  pcmcia: avoid static analysis complaint about use-after-free
  fs/jfs: Fix typo in comment : 'how may' -&gt; 'how many'
  of: add missing documentation for of_platform_populate()
  btrfs: remove unnecessary cur_trans set before goto loop in join_transaction
  sound: soc: Fix typo in sound/codecs
  treewide: Fix typo in various drivers
  btrfs: fix comment typos
  Update ibmvscsi module name in Kconfig.
  powerpc: fix typo (utilties -&gt; utilities)
  of: fix spelling mistake in comment
  h8300: Fix home page URL in h8300/README
  xtensa: Fix home page URL in Kconfig
  ...
</content>
</entry>
<entry>
<title>Merge tag 'tty-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty</title>
<updated>2013-02-21T21:41:04Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-02-21T21:41:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=21eaab6d19ed43e82ed39c8deb7f192134fb4a0e'/>
<id>urn:sha1:21eaab6d19ed43e82ed39c8deb7f192134fb4a0e</id>
<content type='text'>
Pull tty/serial patches from Greg Kroah-Hartman:
 "Here's the big tty/serial driver patches for 3.9-rc1.

  More tty port rework and fixes from Jiri here, as well as lots of
  individual serial driver updates and fixes.

  All of these have been in the linux-next tree for a while."

* tag 'tty-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (140 commits)
  tty: mxser: improve error handling in mxser_probe() and mxser_module_init()
  serial: imx: fix uninitialized variable warning
  serial: tegra: assume CONFIG_OF
  TTY: do not update atime/mtime on read/write
  lguest: select CONFIG_TTY to build properly.
  ARM defconfigs: add missing inclusions of linux/platform_device.h
  fb/exynos: include platform_device.h
  ARM: sa1100/assabet: include platform_device.h directly
  serial: imx: Fix recursive locking bug
  pps: Fix build breakage from decoupling pps from tty
  tty: Remove ancient hardpps()
  pps: Additional cleanups in uart_handle_dcd_change
  pps: Move timestamp read into PPS code proper
  pps: Don't crash the machine when exiting will do
  pps: Fix a use-after free bug when unregistering a source.
  pps: Use pps_lookup_dev to reduce ldisc coupling
  pps: Add pps_lookup_dev() function
  tty: serial: uartlite: Support uartlite on big and little endian systems
  tty: serial: uartlite: Fix sparse and checkpatch warnings
  serial/arc-uart: Miscll DT related updates (Grant's review comments)
  ...

Fix up trivial conflicts, mostly just due to the TTY config option
clashing with the EXPERIMENTAL removal.
</content>
</entry>
<entry>
<title>net: proc: change proc_net_remove to remove_proc_entry</title>
<updated>2013-02-18T19:53:08Z</updated>
<author>
<name>Gao feng</name>
<email>gaofeng@cn.fujitsu.com</email>
</author>
<published>2013-02-18T01:34:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ece31ffd539e8e2b586b1ca5f50bc4f4591e3893'/>
<id>urn:sha1:ece31ffd539e8e2b586b1ca5f50bc4f4591e3893</id>
<content type='text'>
proc_net_remove is only used to remove proc entries
that under /proc/net,it's not a general function for
removing proc entries of netns. if we want to remove
some proc entries which under /proc/net/stat/, we still
need to call remove_proc_entry.

this patch use remove_proc_entry to replace proc_net_remove.
we can remove proc_net_remove after this patch.

Signed-off-by: Gao feng &lt;gaofeng@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: proc: change proc_net_fops_create to proc_create</title>
<updated>2013-02-18T19:53:08Z</updated>
<author>
<name>Gao feng</name>
<email>gaofeng@cn.fujitsu.com</email>
</author>
<published>2013-02-18T01:34:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d4beaa66add8aebf83ab16d2fde4e4de8dac36df'/>
<id>urn:sha1:d4beaa66add8aebf83ab16d2fde4e4de8dac36df</id>
<content type='text'>
Right now, some modules such as bonding use proc_create
to create proc entries under /proc/net/, and other modules
such as ipv4 use proc_net_fops_create.

It looks a little chaos.this patch changes all of
proc_net_fops_create to proc_create. we can remove
proc_net_fops_create after this patch.

Signed-off-by: Gao feng &lt;gaofeng@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
