<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/vxlan.c, branch v3.11</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/net/vxlan.c?h=v3.11</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/net/vxlan.c?h=v3.11'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-08-09T18:41:45Z</updated>
<entry>
<title>vxlan: fix a soft lockup in vxlan module removal</title>
<updated>2013-08-09T18:41:45Z</updated>
<author>
<name>Cong Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2013-08-07T08:43:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ffbe4a539f69fa3e2f3be74627ca2c830f9d923b'/>
<id>urn:sha1:ffbe4a539f69fa3e2f3be74627ca2c830f9d923b</id>
<content type='text'>
This is a regression introduced by:

	commit fe5c3561e6f0ac7c9546209f01351113c1b77ec8
	Author: stephen hemminger &lt;stephen@networkplumber.org&gt;
	Date:   Sat Jul 13 10:18:18 2013 -0700

	    vxlan: add necessary locking on device removal

The problem is that vxlan_dellink(), which is called with RTNL lock
held, tries to flush the workqueue synchronously, but apparently
igmp_join and igmp_leave work need to hold RTNL lock too, therefore we
have a soft lockup!

As suggested by Stephen, probably the flush_workqueue can just be
removed and let the normal refcounting work. The workqueue has a
reference to device and socket, therefore the cleanups should work
correctly.

Suggested-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Cc: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Tested-by: Cong Wang &lt;amwang@redhat.com&gt;
Signed-off-by: Cong Wang &lt;amwang@redhat.com&gt;
Acked-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>vxlan: fix a regression of igmp join</title>
<updated>2013-08-09T18:41:45Z</updated>
<author>
<name>Cong Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2013-08-07T08:35:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=614334df2d6dcc5e15eaa8066a649535d50f329b'/>
<id>urn:sha1:614334df2d6dcc5e15eaa8066a649535d50f329b</id>
<content type='text'>
This is a regression introduced by:

	commit 3fc2de2faba387218bdf9dbc6b13f513ac3b060a
	Author: stephen hemminger &lt;stephen@networkplumber.org&gt;
	Date:   Thu Jul 18 08:40:15 2013 -0700

	    vxlan: fix igmp races

Before this commit, the old code was:

       if (vxlan_group_used(vn, vxlan-&gt;default_dst.remote_ip))
               ip_mc_join_group(sk, &amp;mreq);
       else
               ip_mc_leave_group(sk, &amp;mreq);

therefore we shoud check vxlan_group_used(), not its opposite,
for igmp_join.

Cc: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Cong Wang &lt;amwang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>vxlan: fix igmp races</title>
<updated>2013-07-20T00:07:25Z</updated>
<author>
<name>stephen hemminger</name>
<email>stephen@networkplumber.org</email>
</author>
<published>2013-07-18T15:40:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3fc2de2faba387218bdf9dbc6b13f513ac3b060a'/>
<id>urn:sha1:3fc2de2faba387218bdf9dbc6b13f513ac3b060a</id>
<content type='text'>
There are two race conditions in existing code for doing IGMP
management in workqueue in vxlan. First, the vxlan_group_used
function checks the list of vxlan's without any protection, and
it is possible for open followed by close to occur before the
igmp work queue runs.

To solve these move the check into vxlan_open/stop so it is
protected by RTNL. And split into two work structures so that
there is no racy reference to underlying device state.

Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>vxlan: unregister on namespace exit</title>
<updated>2013-07-20T00:07:25Z</updated>
<author>
<name>stephen hemminger</name>
<email>stephen@networkplumber.org</email>
</author>
<published>2013-07-18T15:38:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=372675a4a9ac0a0af962d44dadeea69926ce45e0'/>
<id>urn:sha1:372675a4a9ac0a0af962d44dadeea69926ce45e0</id>
<content type='text'>
Fix memory leaks and other badness from VXLAN network namespace
teardown. When network namespace is removed, all the vxlan devices should
be unregistered (not closed).

Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Reviewed-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>vxlan: add necessary locking on device removal</title>
<updated>2013-07-17T19:51:19Z</updated>
<author>
<name>stephen hemminger</name>
<email>stephen@networkplumber.org</email>
</author>
<published>2013-07-13T17:18:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fe5c3561e6f0ac7c9546209f01351113c1b77ec8'/>
<id>urn:sha1:fe5c3561e6f0ac7c9546209f01351113c1b77ec8</id>
<content type='text'>
The socket management is now done in workqueue (outside of RTNL)
and protected by vn-&gt;sock_lock. There were two possible bugs, first
the vxlan device was removed from the VNI hash table per socket without
holding lock. And there was a race when device is created and the workqueue
could run after deletion.

Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>vxlan: Fix kernel crash on rmmod.</title>
<updated>2013-07-11T18:45:36Z</updated>
<author>
<name>Pravin B Shelar</name>
<email>pshelar@nicira.com</email>
</author>
<published>2013-07-11T18:38:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f89e57c4f5d7efdbe73b6214c73058aa335870e4'/>
<id>urn:sha1:f89e57c4f5d7efdbe73b6214c73058aa335870e4</id>
<content type='text'>
vxlan exit module unregisters vxlan net and then it unregisters
rtnl ops which triggers vxlan_dellink() from __rtnl_kill_links().
vxlan_dellink() deletes vxlan-dev from vxlan_list which has
list-head in vxlan-net-struct but that is already gone due to
net-unregister. That is how we are getting following crash.

Following commit fixes the crash by fixing module exit path.

BUG: unable to handle kernel paging request at ffff8804102c8000
IP: [&lt;ffffffff812cc5e9&gt;] __list_del_entry+0x29/0xd0
PGD 2972067 PUD 83e019067 PMD 83df97067 PTE 80000004102c8060
Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
Modules linked in: ---
CPU: 19 PID: 6712 Comm: rmmod Tainted: GF            3.10.0+ #95
Hardware name: Dell Inc. PowerEdge R620/0KCKR5, BIOS 1.4.8 10/25/2012
task: ffff88080c47c580 ti: ffff88080ac50000 task.ti: ffff88080ac50000
RIP: 0010:[&lt;ffffffff812cc5e9&gt;]  [&lt;ffffffff812cc5e9&gt;]
__list_del_entry+0x29/0xd0
RSP: 0018:ffff88080ac51e08  EFLAGS: 00010206
RAX: ffff8804102c8000 RBX: ffff88040f0d4b10 RCX: dead000000200200
RDX: ffff8804102c8000 RSI: ffff88080ac51e58 RDI: ffff88040f0d4b10
RBP: ffff88080ac51e08 R08: 0000000000000001 R09: 2222222222222222
R10: 2222222222222222 R11: 2222222222222222 R12: ffff88080ac51e58
R13: ffffffffa07b8840 R14: ffffffff81ae48c0 R15: ffff88080ac51e58
FS:  00007f9ef105c700(0000) GS:ffff88082a800000(0000)
knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffff8804102c8000 CR3: 00000008227e5000 CR4: 00000000000407e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Stack:
 ffff88080ac51e28 ffffffff812cc6a1 2222222222222222 ffff88040f0d4000
 ffff88080ac51e48 ffffffffa07b3311 ffff88040f0d4000 ffffffff81ae49c8
 ffff88080ac51e98 ffffffff81492fc2 ffff88080ac51e58 ffff88080ac51e58
Call Trace:
 [&lt;ffffffff812cc6a1&gt;] list_del+0x11/0x40
 [&lt;ffffffffa07b3311&gt;] vxlan_dellink+0x51/0x70 [vxlan]
 [&lt;ffffffff81492fc2&gt;] __rtnl_link_unregister+0xa2/0xb0
 [&lt;ffffffff8149448e&gt;] rtnl_link_unregister+0x1e/0x30
 [&lt;ffffffffa07b7b7c&gt;] vxlan_cleanup_module+0x1c/0x2f [vxlan]
 [&lt;ffffffff810c9b31&gt;] SyS_delete_module+0x1d1/0x2c0
 [&lt;ffffffff812b8a0e&gt;] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [&lt;ffffffff81582f42&gt;] system_call_fastpath+0x16/0x1b
Code: eb 9f 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 ad de 48 39 c8 74 7a &lt;4c&gt; 8b
00 4c 39 c7 75 53 4c 8b 42 08 4c 39 c7 75 2b 48 89 42 08
RIP  [&lt;ffffffff812cc5e9&gt;] __list_del_entry+0x29/0xd0
 RSP &lt;ffff88080ac51e08&gt;
CR2: ffff8804102c8000

Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>vxlan: fix function name spelling</title>
<updated>2013-06-26T00:06:01Z</updated>
<author>
<name>Stephen Hemminger</name>
<email>stephen@networkplumber.org</email>
</author>
<published>2013-06-26T00:06:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ba609e9bf15bd7df35e2c06a2e5aaf9ab9289b10'/>
<id>urn:sha1:ba609e9bf15bd7df35e2c06a2e5aaf9ab9289b10</id>
<content type='text'>
Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
</content>
</entry>
<entry>
<title>vxlan: fdb: allow specifying multiple destinations for zero MAC</title>
<updated>2013-06-25T16:31:40Z</updated>
<author>
<name>Mike Rapoport</name>
<email>mike.rapoport@ravellosystems.com</email>
</author>
<published>2013-06-25T13:01:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=58e4c767046a35f11a55af6ce946054ddf4a8580'/>
<id>urn:sha1:58e4c767046a35f11a55af6ce946054ddf4a8580</id>
<content type='text'>
The zero MAC entry in the fdb is used as default destination. With
multiple default destinations it is possible to use vxlan in
environments that disable multicast on the infrastructure level, e.g.
public clouds.

Signed-off-by: Mike Rapoport &lt;mike.rapoport@ravellosystems.com&gt;
Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
</content>
</entry>
<entry>
<title>vxlan: allow removal of single destination from fdb entry</title>
<updated>2013-06-25T16:31:38Z</updated>
<author>
<name>Mike Rapoport</name>
<email>mike.rapoport@ravellosystems.com</email>
</author>
<published>2013-06-25T13:01:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bc7892ba39992c6d645e906f1d52a626395b4b11'/>
<id>urn:sha1:bc7892ba39992c6d645e906f1d52a626395b4b11</id>
<content type='text'>
When the last item is deleted from the remote destinations list, the
fdb entry is destroyed.

Signed-off-by: Mike Rapoport &lt;mike.rapoport@ravellosystems.com&gt;
Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
</content>
</entry>
<entry>
<title>vxlan: introduce vxlan_fdb_parse</title>
<updated>2013-06-25T16:31:37Z</updated>
<author>
<name>Mike Rapoport</name>
<email>mike.rapoport@ravellosystems.com</email>
</author>
<published>2013-06-25T13:01:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f0b074be7b61a800e39053d73dabf850649c1c8f'/>
<id>urn:sha1:f0b074be7b61a800e39053d73dabf850649c1c8f</id>
<content type='text'>
which will be reused by vxlan_fdb_delete

Signed-off-by: Mike Rapoport &lt;mike.rapoport@ravellosystems.com&gt;
Signed-off-by: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
</content>
</entry>
</feed>
