<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net, branch v3.10.28</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/net?h=v3.10.28</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/net?h=v3.10.28'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-01-15T23:28:50Z</updated>
<entry>
<title>virtio-net: fix refill races during restore</title>
<updated>2014-01-15T23:28:50Z</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2013-12-30T03:34:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6a0827c4051600d836b16ed9cb6caf78b26573bc'/>
<id>urn:sha1:6a0827c4051600d836b16ed9cb6caf78b26573bc</id>
<content type='text'>
[ Upstream commit 6cd4ce0099da7702f885b6fa9ebb49e3831d90b4 ]

During restoring, try_fill_recv() was called with neither napi lock nor napi
disabled. This can lead two try_fill_recv() was called in the same time. Fix
this by refilling before trying to enable napi.

Fixes 0741bcb5584f9e2390ae6261573c4de8314999f2
(virtio: net: Add freeze, restore handlers to support S4).

Cc: Amit Shah &lt;amit.shah@redhat.com&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.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>virtio_net: don't leak memory or block when too many frags</title>
<updated>2014-01-15T23:28:49Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2013-12-26T13:32:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fcd8e312578603626f0d78084d7ec2e444489aa4'/>
<id>urn:sha1:fcd8e312578603626f0d78084d7ec2e444489aa4</id>
<content type='text'>
We leak an skb when there are too many frags,
we also stop processing the packet in the middle,
the result is almost sure to be loss of networking.

Reported-by: Michael Dalton &lt;mwdalton@google.com&gt;
Acked-by: Michael Dalton &lt;mwdalton@google.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>virtio-net: make all RX paths handle errors consistently</title>
<updated>2014-01-15T23:28:49Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2013-12-26T13:32:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=59d2a52eb56dcdaec3c81c456bf408cbab13bde6'/>
<id>urn:sha1:59d2a52eb56dcdaec3c81c456bf408cbab13bde6</id>
<content type='text'>
receive mergeable now handles errors internally.
Do same for big and small packet paths, otherwise
the logic is too hard to follow.

Cc: Jason Wang &lt;jasowang@redhat.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Michael Dalton &lt;mwdalton@google.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
(cherry picked from commit f121159d72091f25afb22007c833e60a6845e912)
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>virtio_net: fix error handling for mergeable buffers</title>
<updated>2014-01-15T23:28:49Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2013-12-26T13:32:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e32904ec6251df8e552074c9eb068606955d894c'/>
<id>urn:sha1:e32904ec6251df8e552074c9eb068606955d894c</id>
<content type='text'>
Eric Dumazet noticed that if we encounter an error
when processing a mergeable buffer, we don't
dequeue all of the buffers from this packet,
the result is almost sure to be loss of networking.

Fix this issue.

Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Michael Dalton &lt;mwdalton@google.com&gt;
Acked-by: Michael Dalton &lt;mwdalton@google.com&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Jason Wang &lt;jasowang@redhat.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
(cherry picked from commit 8fc3b9e9a229778e5af3aa453c44f1a3857ba769)
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: fec: fix potential use after free</title>
<updated>2014-01-15T23:28:48Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2013-12-19T18:53:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cf3daa7cbcf9ac14a7549239d7ff3464138a79c8'/>
<id>urn:sha1:cf3daa7cbcf9ac14a7549239d7ff3464138a79c8</id>
<content type='text'>
[ Upstream commit 7a2a84518cfb263d2c4171b3d63671f88316adb2 ]

skb_tx_timestamp(skb) should be called _before_ TX completion
has a chance to trigger, otherwise it is too late and we access
freed memory.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Fixes: de5fb0a05348 ("net: fec: put tx to napi poll function to fix dead lock")
Cc: Frank Li &lt;Frank.Li@freescale.com&gt;
Cc: Richard Cochran &lt;richardcochran@gmail.com&gt;
Acked-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Acked-by: Frank Li &lt;Frank.Li@freescale.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>hamradio/yam: fix info leak in ioctl</title>
<updated>2014-01-15T23:28:48Z</updated>
<author>
<name>Salva Peiró</name>
<email>speiro@ai2.upv.es</email>
</author>
<published>2013-12-17T09:06:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8f3843be6e6d1fcc5bcdad42b569a5d4797d9d1f'/>
<id>urn:sha1:8f3843be6e6d1fcc5bcdad42b569a5d4797d9d1f</id>
<content type='text'>
[ Upstream commit 8e3fbf870481eb53b2d3a322d1fc395ad8b367ed ]

The yam_ioctl() code fails to initialise the cmd field
of the struct yamdrv_ioctl_cfg. Add an explicit memset(0)
before filling the structure to avoid the 4-byte info leak.

Signed-off-by: Salva Peiró &lt;speiro@ai2.upv.es&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>drivers/net/hamradio: Integer overflow in hdlcdrv_ioctl()</title>
<updated>2014-01-15T23:28:48Z</updated>
<author>
<name>Wenliang Fan</name>
<email>fanwlexca@gmail.com</email>
</author>
<published>2013-12-17T03:25:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2173ca37c090930f51f701fdd963b63fe2502789'/>
<id>urn:sha1:2173ca37c090930f51f701fdd963b63fe2502789</id>
<content type='text'>
[ Upstream commit e9db5c21d3646a6454fcd04938dd215ac3ab620a ]

The local variable 'bi' comes from userspace. If userspace passed a
large number to 'bi.data.calibrate', there would be an integer overflow
in the following line:
	s-&gt;hdlctx.calibrate = bi.data.calibrate * s-&gt;par.bitrate / 16;

Signed-off-by: Wenliang Fan &lt;fanwlexca@gmail.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>netvsc: don't flush peers notifying work during setting mtu</title>
<updated>2014-01-15T23:28:47Z</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2013-12-13T09:21:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=02cbaec37a24f39e83b51a519147f79921299e24'/>
<id>urn:sha1:02cbaec37a24f39e83b51a519147f79921299e24</id>
<content type='text'>
[ Upstream commit 50dc875f2e6e2e04aed3b3033eb0ac99192d6d02 ]

There's a possible deadlock if we flush the peers notifying work during setting
mtu:

[   22.991149] ======================================================
[   22.991173] [ INFO: possible circular locking dependency detected ]
[   22.991198] 3.10.0-54.0.1.el7.x86_64.debug #1 Not tainted
[   22.991219] -------------------------------------------------------
[   22.991243] ip/974 is trying to acquire lock:
[   22.991261]  ((&amp;(&amp;net_device_ctx-&gt;dwork)-&gt;work)){+.+.+.}, at: [&lt;ffffffff8108af95&gt;] flush_work+0x5/0x2e0
[   22.991307]
but task is already holding lock:
[   22.991330]  (rtnl_mutex){+.+.+.}, at: [&lt;ffffffff81539deb&gt;] rtnetlink_rcv+0x1b/0x40
[   22.991367]
which lock already depends on the new lock.

[   22.991398]
the existing dependency chain (in reverse order) is:
[   22.991426]
-&gt; #1 (rtnl_mutex){+.+.+.}:
[   22.991449]        [&lt;ffffffff810dfdd9&gt;] __lock_acquire+0xb19/0x1260
[   22.991477]        [&lt;ffffffff810e0d12&gt;] lock_acquire+0xa2/0x1f0
[   22.991501]        [&lt;ffffffff81673659&gt;] mutex_lock_nested+0x89/0x4f0
[   22.991529]        [&lt;ffffffff815392b7&gt;] rtnl_lock+0x17/0x20
[   22.991552]        [&lt;ffffffff815230b2&gt;] netdev_notify_peers+0x12/0x30
[   22.991579]        [&lt;ffffffffa0340212&gt;] netvsc_send_garp+0x22/0x30 [hv_netvsc]
[   22.991610]        [&lt;ffffffff8108d251&gt;] process_one_work+0x211/0x6e0
[   22.991637]        [&lt;ffffffff8108d83b&gt;] worker_thread+0x11b/0x3a0
[   22.991663]        [&lt;ffffffff81095e5d&gt;] kthread+0xed/0x100
[   22.991686]        [&lt;ffffffff81681c6c&gt;] ret_from_fork+0x7c/0xb0
[   22.991715]
-&gt; #0 ((&amp;(&amp;net_device_ctx-&gt;dwork)-&gt;work)){+.+.+.}:
[   22.991715]        [&lt;ffffffff810de817&gt;] check_prevs_add+0x967/0x970
[   22.991715]        [&lt;ffffffff810dfdd9&gt;] __lock_acquire+0xb19/0x1260
[   22.991715]        [&lt;ffffffff810e0d12&gt;] lock_acquire+0xa2/0x1f0
[   22.991715]        [&lt;ffffffff8108afde&gt;] flush_work+0x4e/0x2e0
[   22.991715]        [&lt;ffffffff8108e1b5&gt;] __cancel_work_timer+0x95/0x130
[   22.991715]        [&lt;ffffffff8108e303&gt;] cancel_delayed_work_sync+0x13/0x20
[   22.991715]        [&lt;ffffffffa03404e4&gt;] netvsc_change_mtu+0x84/0x200 [hv_netvsc]
[   22.991715]        [&lt;ffffffff815233d4&gt;] dev_set_mtu+0x34/0x80
[   22.991715]        [&lt;ffffffff8153bc2a&gt;] do_setlink+0x23a/0xa00
[   22.991715]        [&lt;ffffffff8153d054&gt;] rtnl_newlink+0x394/0x5e0
[   22.991715]        [&lt;ffffffff81539eac&gt;] rtnetlink_rcv_msg+0x9c/0x260
[   22.991715]        [&lt;ffffffff8155cdd9&gt;] netlink_rcv_skb+0xa9/0xc0
[   22.991715]        [&lt;ffffffff81539dfa&gt;] rtnetlink_rcv+0x2a/0x40
[   22.991715]        [&lt;ffffffff8155c41d&gt;] netlink_unicast+0xdd/0x190
[   22.991715]        [&lt;ffffffff8155c807&gt;] netlink_sendmsg+0x337/0x750
[   22.991715]        [&lt;ffffffff8150d219&gt;] sock_sendmsg+0x99/0xd0
[   22.991715]        [&lt;ffffffff8150d63e&gt;] ___sys_sendmsg+0x39e/0x3b0
[   22.991715]        [&lt;ffffffff8150eba2&gt;] __sys_sendmsg+0x42/0x80
[   22.991715]        [&lt;ffffffff8150ebf2&gt;] SyS_sendmsg+0x12/0x20
[   22.991715]        [&lt;ffffffff81681d19&gt;] system_call_fastpath+0x16/0x1b

This is because we hold the rtnl_lock() before ndo_change_mtu() and try to flush
the work in netvsc_change_mtu(), in the mean time, netdev_notify_peers() may be
called from worker and also trying to hold the rtnl_lock. This will lead the
flush won't succeed forever. Solve this by not canceling and flushing the work,
this is safe because the transmission done by NETDEV_NOTIFY_PEERS was
synchronized with the netif_tx_disable() called by netvsc_change_mtu().

Reported-by: Yaju Cao &lt;yacao@redhat.com&gt;
Tested-by: Yaju Cao &lt;yacao@redhat.com&gt;
Cc: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Cc: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Acked-by: Haiyang Zhang &lt;haiyangz@microsoft.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>tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0</title>
<updated>2014-01-15T23:28:47Z</updated>
<author>
<name>Nat Gurumoorthy</name>
<email>natg@google.com</email>
</author>
<published>2013-12-09T18:43:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fa57cd8a526cb76ae372f0963339883f8e9f69bb'/>
<id>urn:sha1:fa57cd8a526cb76ae372f0963339883f8e9f69bb</id>
<content type='text'>
[ Upstream commit 388d3335575f4c056dcf7138a30f1454e2145cd8 ]

The new tg3 driver leaves REG_BASE_ADDR (PCI config offset 120)
uninitialized. From power on reset this register may have garbage in it. The
Register Base Address register defines the device local address of a
register. The data pointed to by this location is read or written using
the Register Data register (PCI config offset 128). When REG_BASE_ADDR has
garbage any read or write of Register Data Register (PCI 128) will cause the
PCI bus to lock up. The TCO watchdog will fire and bring down the system.

Signed-off-by: Nat Gurumoorthy &lt;natg@google.com&gt;
Acked-by: Michael Chan &lt;mchan@broadcom.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>virtio: delete napi structures from netdev before releasing memory</title>
<updated>2014-01-15T23:28:46Z</updated>
<author>
<name>Andrey Vagin</name>
<email>avagin@openvz.org</email>
</author>
<published>2013-12-05T14:36:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4ea85d9e4113ba0b2d67d762a29c809df948426a'/>
<id>urn:sha1:4ea85d9e4113ba0b2d67d762a29c809df948426a</id>
<content type='text'>
[ Upstream commit d4fb84eefe5164f6a6ea51d0a9e26280c661a0dd ]

free_netdev calls netif_napi_del too, but it's too late, because napi
structures are placed on vi-&gt;rq. netif_napi_add() is called from
virtnet_alloc_queues.

general protection fault: 0000 [#1] SMP
Dumping ftrace buffer:
   (ftrace buffer empty)
Modules linked in: ip6table_filter ip6_tables iptable_filter ip_tables virtio_balloon pcspkr virtio_net(-) i2c_pii
CPU: 1 PID: 347 Comm: rmmod Not tainted 3.13.0-rc2+ #171
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
task: ffff8800b779c420 ti: ffff8800379e0000 task.ti: ffff8800379e0000
RIP: 0010:[&lt;ffffffff81322e19&gt;]  [&lt;ffffffff81322e19&gt;] __list_del_entry+0x29/0xd0
RSP: 0018:ffff8800379e1dd0  EFLAGS: 00010a83
RAX: 6b6b6b6b6b6b6b6b RBX: ffff8800379c2fd0 RCX: dead000000200200
RDX: 6b6b6b6b6b6b6b6b RSI: 0000000000000001 RDI: ffff8800379c2fd0
RBP: ffff8800379e1dd0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: ffff8800379c2f90
R13: ffff880037839160 R14: 0000000000000000 R15: 00000000013352f0
FS:  00007f1400e34740(0000) GS:ffff8800bfb00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00007f464124c763 CR3: 00000000b68cf000 CR4: 00000000000006e0
Stack:
 ffff8800379e1df0 ffffffff8155beab 6b6b6b6b6b6b6b2b ffff8800378391c0
 ffff8800379e1e18 ffffffff8156499b ffff880037839be0 ffff880037839d20
 ffff88003779d3f0 ffff8800379e1e38 ffffffffa003477c ffff88003779d388
Call Trace:
 [&lt;ffffffff8155beab&gt;] netif_napi_del+0x1b/0x80
 [&lt;ffffffff8156499b&gt;] free_netdev+0x8b/0x110
 [&lt;ffffffffa003477c&gt;] virtnet_remove+0x7c/0x90 [virtio_net]
 [&lt;ffffffff813ae323&gt;] virtio_dev_remove+0x23/0x80
 [&lt;ffffffff813f62ef&gt;] __device_release_driver+0x7f/0xf0
 [&lt;ffffffff813f6ca0&gt;] driver_detach+0xc0/0xd0
 [&lt;ffffffff813f5f28&gt;] bus_remove_driver+0x58/0xd0
 [&lt;ffffffff813f72ec&gt;] driver_unregister+0x2c/0x50
 [&lt;ffffffff813ae65e&gt;] unregister_virtio_driver+0xe/0x10
 [&lt;ffffffffa0036942&gt;] virtio_net_driver_exit+0x10/0x6ce [virtio_net]
 [&lt;ffffffff810d7cf2&gt;] SyS_delete_module+0x172/0x220
 [&lt;ffffffff810a732d&gt;] ? trace_hardirqs_on+0xd/0x10
 [&lt;ffffffff810f5d4c&gt;] ? __audit_syscall_entry+0x9c/0xf0
 [&lt;ffffffff81677f69&gt;] system_call_fastpath+0x16/0x1b
Code: 00 00 55 48 8b 17 48 b9 00 01 10 00 00 00 ad de 48 8b 47 08 48 89 e5 48 39 ca 74 29 48 b9 00 02 20 00 00 00
RIP  [&lt;ffffffff81322e19&gt;] __list_del_entry+0x29/0xd0
 RSP &lt;ffff8800379e1dd0&gt;
---[ end trace d5931cd3f87c9763 ]---

Fixes: 986a4f4d452d (virtio_net: multiqueue support)
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: "Michael S. Tsirkin" &lt;mst@redhat.com&gt;
Signed-off-by: Andrey Vagin &lt;avagin@openvz.org&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.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>
</feed>
