We return a destination entry without refcount if a socket
policy is found in xfrm_lookup. This triggers a warning on
a negative refcount when freeeing this dst entry. So take
a refcount in this case to fix it.
This refcount was forgotten when xfrm changed to cache bundles
instead of policies for outgoing flows.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
net/xfrm/xfrm_policy.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
From: Timo Teräs <hidden> Date: 2011-03-16 08:03:25
On 03/16/2011 09:12 AM, Steffen Klassert wrote:
We return a destination entry without refcount if a socket
policy is found in xfrm_lookup. This triggers a warning on
a negative refcount when freeeing this dst entry. So take
a refcount in this case to fix it.
This refcount was forgotten when xfrm changed to cache bundles
instead of policies for outgoing flows.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Timo Teräs <redacted>
Ok. This is one of the corner cases I did not test: having socket policy
something else than no action. I just didn't have the application ready
for it. Sorry about the bug. And good catch Steffen.
From: David Miller <davem@davemloft.net> Date: 2011-03-16 19:55:22
From: Timo Teräs <redacted>
Date: Wed, 16 Mar 2011 10:03:23 +0200
On 03/16/2011 09:12 AM, Steffen Klassert wrote:
quoted
We return a destination entry without refcount if a socket
policy is found in xfrm_lookup. This triggers a warning on
a negative refcount when freeeing this dst entry. So take
a refcount in this case to fix it.
This refcount was forgotten when xfrm changed to cache bundles
instead of policies for outgoing flows.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Timo Teräs <redacted>
Ok. This is one of the corner cases I did not test: having socket policy
something else than no action. I just didn't have the application ready
for it. Sorry about the bug. And good catch Steffen.