From 4a93f5095a628d812b0b30c16d7bacea1efd783c Mon Sep 17 00:00:00 2001 From: Steffen Klassert Date: Wed, 12 Mar 2014 09:43:17 +0100 Subject: flowcache: Fix resource leaks on namespace exit. We leak an active timer, the hotcpu notifier and all allocated resources when we exit a namespace. Fix this by introducing a flow_cache_fini() function where we release the resources before we exit. Fixes: ca925cf1534e ("flowcache: Make flow cache name space aware") Reported-by: Jakub Kicinski Tested-by: Jakub Kicinski Cc: Eric Dumazet Cc: Fan Du Signed-off-by: Steffen Klassert Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- include/net/flow.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/net/flow.h') diff --git a/include/net/flow.h b/include/net/flow.h index bee3741e5a6f..64fd24836650 100644 --- a/include/net/flow.h +++ b/include/net/flow.h @@ -219,6 +219,7 @@ struct flow_cache_object *flow_cache_lookup(struct net *net, u8 dir, flow_resolve_t resolver, void *ctx); int flow_cache_init(struct net *net); +void flow_cache_fini(struct net *net); void flow_cache_flush(struct net *net); void flow_cache_flush_deferred(struct net *net); -- cgit v1.2.3