vxlan: eliminate cached dst leak
authorLance Richardson <lrichard@redhat.com>
Mon, 29 May 2017 17:25:57 +0000 (13:25 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Jun 2017 18:45:21 +0000 (14:45 -0400)
commit35cf2845563c1aaa01d27bd34d64795c4ae72700
treec6d6b763100a97a74e69a033b48140adb8d4c166
parentaeb073241fe7a2b932e04e20c60e47718332877f
vxlan: eliminate cached dst leak

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>
drivers/net/vxlan.c