flowcache: Avoid OOM condition under preasure
authorSteffen Klassert <steffen.klassert@secunet.com>
Mon, 22 Feb 2016 09:40:07 +0000 (10:40 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Thu, 17 Mar 2016 09:28:42 +0000 (10:28 +0100)
commit6ad3122a08e3a9c2148873665752e87cf4f393cc
tree95c89c906cbdf02f28c71bbfdc0513dfe1cdddae
parentaac8d3c282e024c344c5b86dc1eab7af88bb9716
flowcache: Avoid OOM condition under preasure

We can hit an OOM condition if we are under presure because
we can not free the entries in gc_list fast enough. So add
a counter for the not yet freed entries in the gc_list and
refuse new allocations if the value is too high.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/net/netns/xfrm.h
net/core/flow.c