vxlan: eliminate cached dst leak
authorLance Richardson <lrichard@redhat.com>
Mon, 29 May 2017 17:25:57 +0000 (13:25 -0400)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 23 Jul 2017 02:54:08 +0000 (02:54 +0000)
commitee04e7503c45f1de0b62e48c8f9f5a19efd91c88
treecc3bfd6e42b4101869c8c9ac46f1802eac7a5064
parent97b7a76d4c81484ede20b34af3caffa5873609c1
vxlan: eliminate cached dst leak

[ Upstream commit 35cf2845563c1aaa01d27bd34d64795c4ae72700 ]

After commit 0c1d70af924b ("net: use dst_cache for vxlan device"),
cached dst entries could be leaked when more than one remote was
present for a given vxlan_fdb entry, causing subsequent netns
operations to block indefinitely and "unregister_netdevice: waiting
for lo to become free." messages to appear in the kernel log.

Fix by properly releasing cached dst and freeing resources in this
case.

Fixes: 0c1d70af924b ("net: use dst_cache for vxlan device")
Signed-off-by: Lance Richardson <lrichard@redhat.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/vxlan.c