vxlan: fix hlist corruption
authorJiri Benc <jbenc@redhat.com>
Sun, 2 Jul 2017 17:00:57 +0000 (19:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Jul 2017 05:42:18 +0000 (07:42 +0200)
commitbeabc6032772d186976742438d6b1f290894ce44
tree59ba0aa8a1aa117e6e84ca60ad64e5daa5cba352
parentd2c9512085784a6387d688f57b2671c6c15fc984
vxlan: fix hlist corruption

[ Upstream commit 69e766612c4bcb79e19cebed9eed61d4222c1d47 ]

It's not a good idea to add the same hlist_node to two different hash lists.
This leads to various hard to debug memory corruptions.

Fixes: b1be00a6c39f ("vxlan: support both IPv4 and IPv6 sockets in a single vxlan device")
Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/vxlan.c
include/net/vxlan.h