<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/tun.c, branch v3.0.86</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/net/tun.c?h=v3.0.86</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/net/tun.c?h=v3.0.86'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-03-20T19:58:54Z</updated>
<entry>
<title>tun: add a missing nf_reset() in tun_net_xmit()</title>
<updated>2013-03-20T19:58:54Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2013-03-06T11:02:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=20ef510141e92e872e5dfd84dd6c77b8f94effee'/>
<id>urn:sha1:20ef510141e92e872e5dfd84dd6c77b8f94effee</id>
<content type='text'>
[ Upstream commit f8af75f3517a24838a36eb5797a1a3e60bf9e276 ]

Dave reported following crash :

general protection fault: 0000 [#1] SMP
CPU 2
Pid: 25407, comm: qemu-kvm Not tainted 3.7.9-205.fc18.x86_64 #1 Hewlett-Packard HP Z400 Workstation/0B4Ch
RIP: 0010:[&lt;ffffffffa0399bd5&gt;]  [&lt;ffffffffa0399bd5&gt;] destroy_conntrack+0x35/0x120 [nf_conntrack]
RSP: 0018:ffff880276913d78  EFLAGS: 00010206
RAX: 50626b6b7876376c RBX: ffff88026e530d68 RCX: ffff88028d158e00
RDX: ffff88026d0d5470 RSI: 0000000000000011 RDI: 0000000000000002
RBP: ffff880276913d88 R08: 0000000000000000 R09: ffff880295002900
R10: 0000000000000000 R11: 0000000000000003 R12: ffffffff81ca3b40
R13: ffffffff8151a8e0 R14: ffff880270875000 R15: 0000000000000002
FS:  00007ff3bce38a00(0000) GS:ffff88029fc40000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00007fd1430bd000 CR3: 000000027042b000 CR4: 00000000000027e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process qemu-kvm (pid: 25407, threadinfo ffff880276912000, task ffff88028c369720)
Stack:
 ffff880156f59100 ffff880156f59100 ffff880276913d98 ffffffff815534f7
 ffff880276913db8 ffffffff8151a74b ffff880270875000 ffff880156f59100
 ffff880276913dd8 ffffffff8151a5a6 ffff880276913dd8 ffff88026d0d5470
Call Trace:
 [&lt;ffffffff815534f7&gt;] nf_conntrack_destroy+0x17/0x20
 [&lt;ffffffff8151a74b&gt;] skb_release_head_state+0x7b/0x100
 [&lt;ffffffff8151a5a6&gt;] __kfree_skb+0x16/0xa0
 [&lt;ffffffff8151a666&gt;] kfree_skb+0x36/0xa0
 [&lt;ffffffff8151a8e0&gt;] skb_queue_purge+0x20/0x40
 [&lt;ffffffffa02205f7&gt;] __tun_detach+0x117/0x140 [tun]
 [&lt;ffffffffa022184c&gt;] tun_chr_close+0x3c/0xd0 [tun]
 [&lt;ffffffff8119669c&gt;] __fput+0xec/0x240
 [&lt;ffffffff811967fe&gt;] ____fput+0xe/0x10
 [&lt;ffffffff8107eb27&gt;] task_work_run+0xa7/0xe0
 [&lt;ffffffff810149e1&gt;] do_notify_resume+0x71/0xb0
 [&lt;ffffffff81640152&gt;] int_signal+0x12/0x17
Code: 00 00 04 48 89 e5 41 54 53 48 89 fb 4c 8b a7 e8 00 00 00 0f 85 de 00 00 00 0f b6 73 3e 0f b7 7b 2a e8 10 40 00 00 48 85 c0 74 0e &lt;48&gt; 8b 40 28 48 85 c0 74 05 48 89 df ff d0 48 c7 c7 08 6a 3a a0
RIP  [&lt;ffffffffa0399bd5&gt;] destroy_conntrack+0x35/0x120 [nf_conntrack]
 RSP &lt;ffff880276913d78&gt;

This is because tun_net_xmit() needs to call nf_reset()
before queuing skb into receive_queue

Reported-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net/tun: fix ioctl() based info leaks</title>
<updated>2012-08-09T15:27:53Z</updated>
<author>
<name>Mathias Krause</name>
<email>minipli@googlemail.com</email>
</author>
<published>2012-07-29T19:45:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4e98953723643ac9db9191381f52973a8f113902'/>
<id>urn:sha1:4e98953723643ac9db9191381f52973a8f113902</id>
<content type='text'>
[ Upstream commits a117dacde0288f3ec60b6e5bcedae8fa37ee0dfc
  and 8bbb181308bc348e02bfdbebdedd4e4ec9d452ce ]

The tun module leaks up to 36 bytes of memory by not fully initializing
a structure located on the stack that gets copied to user memory by the
TUNGETIFF and SIOCGIFHWADDR ioctl()s.

Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared</title>
<updated>2011-08-16T01:31:38Z</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2011-07-26T06:05:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9cf81e790a0d8709cbadbaff73ee40aa944e2ea1'/>
<id>urn:sha1:9cf81e790a0d8709cbadbaff73ee40aa944e2ea1</id>
<content type='text'>
[ Upstream commit 550fd08c2cebad61c548def135f67aba284c6162 ]

After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs.  There are a handful of drivers that violate this assumption of
course, and need to be fixed up.  This patch identifies those drivers, and marks
them as not being able to support the safe transmission of skbs by clearning the
IFF_TX_SKB_SHARING flag in priv_flags

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
CC: Karsten Keil &lt;isdn@linux-pingi.de&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
CC: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: Patrick McHardy &lt;kaber@trash.net&gt;
CC: Krzysztof Halasa &lt;khc@pm.waw.pl&gt;
CC: "John W. Linville" &lt;linville@tuxdriver.com&gt;
CC: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
CC: Marcel Holtmann &lt;marcel@holtmann.org&gt;
CC: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>tun: teach the tun/tap driver to support netpoll</title>
<updated>2011-06-17T03:53:10Z</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2011-06-15T05:25:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bebd097a0af8bd6c51f50a65f3a435019b0e906a'/>
<id>urn:sha1:bebd097a0af8bd6c51f50a65f3a435019b0e906a</id>
<content type='text'>
Commit 8d8fc29d02a33e4bd5f4fa47823c1fd386346093 changed the behavior of slave
devices in regards to netpoll.  Specifically it created a mutually exclusive
relationship between being a slave and a netpoll-capable device.  This creates
problems for KVM because guests relied on needing netconsole active on a slave
device to a bridge.  Ideally libvirtd could just attach netconsole to the bridge
device instead, but thats currently infeasible, because while the bridge device
supports netpoll, it requires that all slave interface also support it, but the
tun/tap driver currently does not.  The most direct solution is to teach tun/tap
to support netpoll, which is implemented by the patch below.

I've not tested this yet, but its pretty straightforward.

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Reported-by: Rik van Riel &lt;riel@redhat.com&gt;
CC: Rik van Riel &lt;riel@redhat.com&gt;
CC: Maxim Krasnyansky &lt;maxk@qualcomm.com&gt;
CC: Cong Wang &lt;amwang@redhat.com&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
Reviewed-by: Rik van Riel &lt;riel@redhat.com&gt;
Tested-by: Rik van Riel &lt;riel@redhat.com&gt;
Reviewed-by: WANG Cong &lt;amwang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@conan.davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: call dev_alloc_name from register_netdevice</title>
<updated>2011-05-05T17:57:45Z</updated>
<author>
<name>Jiri Pirko</name>
<email>jpirko@redhat.com</email>
</author>
<published>2011-04-30T01:21:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1c5cae815d19ffe02bdfda1260949ef2b1806171'/>
<id>urn:sha1:1c5cae815d19ffe02bdfda1260949ef2b1806171</id>
<content type='text'>
Force dev_alloc_name() to be called from register_netdevice() by
dev_get_valid_name(). That allows to remove multiple explicit
dev_alloc_name() calls.

The possibility to call dev_alloc_name in advance remains.

This also fixes veth creation regresion caused by
84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743

Signed-off-by: Jiri Pirko &lt;jpirko@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ethtool: cosmetic: Use ethtool ethtool_cmd_speed API</title>
<updated>2011-04-29T21:03:01Z</updated>
<author>
<name>David Decotigny</name>
<email>decot@google.com</email>
</author>
<published>2011-04-27T18:32:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=707394972093e2056e1e8cc39be19cf9bcb3e7b3'/>
<id>urn:sha1:707394972093e2056e1e8cc39be19cf9bcb3e7b3</id>
<content type='text'>
This updates the network drivers so that they don't access the
ethtool_cmd::speed field directly, but use ethtool_cmd_speed()
instead.

For most of the drivers, these changes are purely cosmetic and don't
fix any problem, such as for those 1GbE/10GbE drivers that indirectly
call their own ethtool get_settings()/mii_ethtool_gset(). The changes
are meant to enforce code consistency and provide robustness with
future larger throughputs, at the expense of a few CPU cycles for each
ethtool operation.

All drivers compiled with make allyesconfig ion x86_64 have been
updated.

Tested: make allyesconfig on x86_64 + e1000e/bnx2x work
Signed-off-by: David Decotigny &lt;decot@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: tun: convert to hw_features</title>
<updated>2011-04-20T08:30:45Z</updated>
<author>
<name>Michał Mirosław</name>
<email>mirq-linux@rere.qmqm.pl</email>
</author>
<published>2011-04-19T06:13:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=882553752196605bf27057e7adb298ecae8058c4'/>
<id>urn:sha1:882553752196605bf27057e7adb298ecae8058c4</id>
<content type='text'>
This changes offload setting behaviour to what I think is correct:
 - offloads set via ethtool mean what admin wants to use (by default
   he wants 'em all)
 - offloads set via ioctl() mean what userspace is expecting to get
   (this limits which admin wishes are granted)
 - TUN_NOCHECKSUM is ignored, as it might cause broken packets when
   forwarded (ip_summed == CHECKSUM_UNNECESSARY means that checksum
   was verified, not that it can be ignored)

If TUN_NOCHECKSUM is implemented, it should set skb-&gt;csum_* and
skb-&gt;ip_summed (= CHECKSUM_PARTIAL) for known protocols and let others
be verified by kernel when necessary.

TUN_NOCHECKSUM handling was introduced by commit
f43798c27684ab925adde7d8acc34c78c6e50df8:

    tun: Allow GSO using virtio_net_hdr

Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tun: Convert logging messages to pr_&lt;level&gt; and tun_debug</title>
<updated>2011-03-03T20:21:14Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2011-03-02T07:18:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6b8a66ee919e40111e3d257b2c22b5773e34ead1'/>
<id>urn:sha1:6b8a66ee919e40111e3d257b2c22b5773e34ead1</id>
<content type='text'>
Use the current logging forms with pr_fmt.
Convert DBG macro to tun_debug, use netdev_printk as well.
Add printf verification when TUN_DEBUG not defined.
Miscellaneous comment typo fix.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: change netdev-&gt;features to u32</title>
<updated>2011-01-24T23:32:47Z</updated>
<author>
<name>Michał Mirosław</name>
<email>mirq-linux@rere.qmqm.pl</email>
</author>
<published>2011-01-24T23:32:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=04ed3e741d0f133e02bed7fa5c98edba128f90e7'/>
<id>urn:sha1:04ed3e741d0f133e02bed7fa5c98edba128f90e7</id>
<content type='text'>
Quoting Ben Hutchings: we presumably won't be defining features that
can only be enabled on 64-bit architectures.

Occurences found by `grep -r` on net/, drivers/net, include/

[ Move features and vlan_features next to each other in
  struct netdev, as per Eric Dumazet's suggestion -DaveM ]

Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial</title>
<updated>2011-01-13T18:05:56Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-01-13T18:05:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=008d23e4852d78bb2618f2035f8b2110b6a6b968'/>
<id>urn:sha1:008d23e4852d78bb2618f2035f8b2110b6a6b968</id>
<content type='text'>
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
  Documentation/trace/events.txt: Remove obsolete sched_signal_send.
  writeback: fix global_dirty_limits comment runtime -&gt; real-time
  ppc: fix comment typo singal -&gt; signal
  drivers: fix comment typo diable -&gt; disable.
  m68k: fix comment typo diable -&gt; disable.
  wireless: comment typo fix diable -&gt; disable.
  media: comment typo fix diable -&gt; disable.
  remove doc for obsolete dynamic-printk kernel-parameter
  remove extraneous 'is' from Documentation/iostats.txt
  Fix spelling milisec -&gt; ms in snd_ps3 module parameter description
  Fix spelling mistakes in comments
  Revert conflicting V4L changes
  i7core_edac: fix typos in comments
  mm/rmap.c: fix comment
  sound, ca0106: Fix assignment to 'channel'.
  hrtimer: fix a typo in comment
  init/Kconfig: fix typo
  anon_inodes: fix wrong function name in comment
  fix comment typos concerning "consistent"
  poll: fix a typo in comment
  ...

Fix up trivial conflicts in:
 - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c)
 - fs/ext4/ext4.h

Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.
</content>
</entry>
</feed>
