OSDN Git Service

vxlan: eliminate cached dst leak
authorLance Richardson <lrichard@redhat.com>
Mon, 29 May 2017 17:25:57 +0000 (13:25 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2017 13:05:51 +0000 (15:05 +0200)
commitb5e9b7ad0dd449b9296e16f4c0da9d4bb3d36d6d
tree927472c82772cbedf9cd31c5536b7bac8809139b
parent96d145216b5884c3ba3003b2ccd6eb2da625a77d
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