<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/hyperv, branch v3.4.80</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/net/hyperv?h=v3.4.80</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/net/hyperv?h=v3.4.80'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-01-15T23:27:11Z</updated>
<entry>
<title>netvsc: don't flush peers notifying work during setting mtu</title>
<updated>2014-01-15T23:27:11Z</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=0248d4b4d5bed909c52877e16db569361648c952'/>
<id>urn:sha1:0248d4b4d5bed909c52877e16db569361648c952</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>net/hyperv: Adding cancellation to ensure rndis filter is closed</title>
<updated>2012-04-21T19:38:10Z</updated>
<author>
<name>Wenqi Ma</name>
<email>wenqi_ma@trendmicro.com.cn</email>
</author>
<published>2012-04-19T00:39:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=792df87228965c58c307877af00498641584bd47'/>
<id>urn:sha1:792df87228965c58c307877af00498641584bd47</id>
<content type='text'>
Although the network interface is down, the RX packets number which
could be observed by ifconfig may keep on increasing.

This is because the WORK scheduled in netvsc_set_multicast_list()
may be executed after netvsc_close(). That means the rndis filter
may be re-enabled by do_set_multicast() even if it was closed by
netvsc_close().

By canceling possible WORK before close the rndis filter, the issue
could be never happened.

Signed-off-by: Wenqi Ma &lt;wenqi_ma@trendmicro.com.cn&gt;
Reviewed-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/hyperv: Fix the code handling tx busy</title>
<updated>2012-03-19T21:27:06Z</updated>
<author>
<name>Haiyang Zhang</name>
<email>haiyangz@microsoft.com</email>
</author>
<published>2012-03-19T21:27:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=da24e906cbfc08171d24a2b7cf66fad565fdd121'/>
<id>urn:sha1:da24e906cbfc08171d24a2b7cf66fad565fdd121</id>
<content type='text'>
Instead of dropping the packet, we keep the skb buffer, and return
NETDEV_TX_BUSY to let upper layer retry send. This will not cause
endless loop, because the host is taking data away from ring buffer,
and we have called the stop_queue before returning NETDEV_TX_BUSY.

The stop_queue was called in the function netvsc_send() in file 
netvsc.c, then it returns to rndis_filter_send(), which returns to
netvsc_start_xmit() in file netvsc_drv.c. So the NETDEV_TX_BUSY is
indeed returned AFTER queue is stopped.

Signed-off-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Reviewed-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2012-03-19T03:29:41Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-03-19T03:29:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4da0bd736552e6377b407b3c3d3ae518ebbdd269'/>
<id>urn:sha1:4da0bd736552e6377b407b3c3d3ae518ebbdd269</id>
<content type='text'>
</content>
</entry>
<entry>
<title>net/hyperv: fix erroneous NETDEV_TX_BUSY use</title>
<updated>2012-03-16T09:01:17Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-03-14T08:53:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bb6d5e76fb4fba9aa36726db41404512f3286c0f'/>
<id>urn:sha1:bb6d5e76fb4fba9aa36726db41404512f3286c0f</id>
<content type='text'>
A driver start_xmit() method cannot free skb and return NETDEV_TX_BUSY,
since caller is going to reuse freed skb.

This is mostly a revert of commit bf769375c (staging: hv: fix the return
status of netvsc_start_xmit())

In fact netif_tx_stop_queue() / netif_stop_queue() is needed before
returning NETDEV_TX_BUSY or you can trigger a ksoftirqd fatal loop.

In case of memory allocation error, only safe way is to drop the packet
and return NETDEV_TX_OK

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: "K. Y. Srinivasan" &lt;kys@microsoft.com&gt;
Cc: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/hyperv: Add support for vlan trunking from guests</title>
<updated>2012-03-13T00:06:48Z</updated>
<author>
<name>Haiyang Zhang</name>
<email>haiyangz@microsoft.com</email>
</author>
<published>2012-03-12T10:20:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1f5f3a75e216fe771b8d6805e0bb2f43595a6ee1'/>
<id>urn:sha1:1f5f3a75e216fe771b8d6805e0bb2f43595a6ee1</id>
<content type='text'>
With this feature, a Linux guest can now configure multiple vlans through
a single synthetic NIC on Win8 Hyper-V host.

Signed-off-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Reviewed-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/hyperv: Fix data corruption in rndis_filter_receive()</title>
<updated>2012-03-13T00:06:48Z</updated>
<author>
<name>Haiyang Zhang</name>
<email>haiyangz@microsoft.com</email>
</author>
<published>2012-03-12T10:20:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ef31bef6216db76950c38f1993b45953402f4c63'/>
<id>urn:sha1:ef31bef6216db76950c38f1993b45953402f4c63</id>
<content type='text'>
Limiting the memcpy to be the sizeof(struct rndis_message) can truncate
the message if there are Per-Packet-Info or Out-of-Band data.

In my earlier patch (commit 45326342), the unnecessary kmap_atomic and
kunmap_atomic surrounding this memcpy have been removed because the memory
in the receive buffer is always mapped. This memcpy is not necessary
either. To fix the bug, I removed the memcpy.

Signed-off-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Reviewed-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2012-03-09T22:34:20Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-03-09T22:34:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b2d3298e0916fa059712691c85a0e97becc4ab9f'/>
<id>urn:sha1:b2d3298e0916fa059712691c85a0e97becc4ab9f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>net/hyperv: Use the built-in macro KBUILD_MODNAME for this driver</title>
<updated>2012-03-08T21:55:27Z</updated>
<author>
<name>Haiyang Zhang</name>
<email>haiyangz@microsoft.com</email>
</author>
<published>2012-03-07T10:02:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d31b20fcc89efa8c5d3f5ea2720e08a286b69a36'/>
<id>urn:sha1:d31b20fcc89efa8c5d3f5ea2720e08a286b69a36</id>
<content type='text'>
Signed-off-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Cc: Olaf Hering &lt;olaf@aepfle.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/hyperv: Remove the unnecessary memset in rndis_filter_send()</title>
<updated>2012-02-05T22:44:55Z</updated>
<author>
<name>Haiyang Zhang</name>
<email>haiyangz@microsoft.com</email>
</author>
<published>2012-02-05T12:13:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bce60806de882cf15ad3a80a51e9878863a8fced'/>
<id>urn:sha1:bce60806de882cf15ad3a80a51e9878863a8fced</id>
<content type='text'>
The memory has been allocated by kzalloc, so it's unnecessary to memset
again.

Signed-off-by: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
