xfrm: release neighbor upon dst destruction
authorRomain KUNTZ <r.kuntz@ipflavors.com>
Mon, 18 Feb 2013 02:36:24 +0000 (02:36 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Feb 2013 13:38:40 +0000 (05:38 -0800)
commit0680a2c2b6c92fdbb2ff8a8c87b0207db5323de7
tree6e31c5aa0b2578d4ac5f4bdcf69f949df695bc31
parent2373718e7ac2bd28488778b38ef826c36aa4999a
xfrm: release neighbor upon dst destruction

[ Upstream commit 18cf0d0784b4a634472ed24d0d7ca1c721d93e90 ]

Neighbor is cloned in xfrm6_fill_dst but seems to never be released.
Neighbor entry should be released when XFRM6 dst entry is destroyed
in xfrm6_dst_destroy, otherwise references may be kept forever on
the device pointed by the neighbor entry.

I may not have understood all the subtleties of XFRM & dst so I would
be happy to receive comments on this patch.

Signed-off-by: Romain Kuntz <r.kuntz@ipflavors.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/xfrm6_policy.c