Skip to content
Commit 0f24558e authored by Horia Geanta's avatar Horia Geanta Committed by Steffen Klassert
Browse files

xfrm: avoid creating temporary SA when there are no listeners



In the case when KMs have no listeners, km_query() will fail and
temporary SAs are garbage collected immediately after their allocation.
This causes strain on memory allocation, leading even to OOM since
temporary SA alloc/free cycle is performed for every packet
and garbage collection does not keep up the pace.

The sane thing to do is to make sure we have audience before
temporary SA allocation.

Signed-off-by: default avatarHoria Geanta <horia.geanta@freescale.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent 5826bdd1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment