]> git.baikalelectronics.ru Git - kernel.git/commit
net/sched: act_ct: Fix leak of ct zone template on replace
authorPaul Blakey <paulb@mellanox.com>
Wed, 18 Mar 2020 10:50:33 +0000 (12:50 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Mar 2020 23:37:06 +0000 (16:37 -0700)
commit230541f5e3f0f38137d9716f4905d438153ffdd0
tree8d85f700e3cd5db399caab601042acc97879f1e2
parent418ce46164b153b1d9e0527f49eaf14cc79ebfd9
net/sched: act_ct: Fix leak of ct zone template on replace

Currently, on replace, the previous action instance params
is swapped with a newly allocated params. The old params is
only freed (via kfree_rcu), without releasing the allocated
ct zone template related to it.

Call tcf_ct_params_free (via call_rcu) for the old params,
so it will release it.

Fixes: 1a23a38cf53c ("net/sched: Introduce action ct")
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_ct.c