]> git.baikalelectronics.ru Git - kernel.git/commit
flowcache: Fix resource leaks on namespace exit.
authorSteffen Klassert <steffen.klassert@secunet.com>
Wed, 12 Mar 2014 08:43:17 +0000 (09:43 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Mar 2014 19:31:18 +0000 (15:31 -0400)
commitc7dc057e30ce848af84a564305b458af83fbf824
tree58d93f95f1e9a63cd0b1e052ddf2e32e0c7eb390
parent735048010030d89ad3776f036fb92e1ee77566cc
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: 4bb3be336df4 ("flowcache: Make flow cache name space aware")
Reported-by: Jakub Kicinski <moorray3@wp.pl>
Tested-by: Jakub Kicinski <moorray3@wp.pl>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Fan Du <fan.du@windriver.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/flow.h
net/core/flow.c
net/xfrm/xfrm_policy.c