]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: fix static key imbalance in case of ingress/clsact_init error
authorJiri Pirko <jiri@mellanox.com>
Fri, 15 Dec 2017 11:40:13 +0000 (12:40 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Dec 2017 20:43:12 +0000 (15:43 -0500)
commite169015fe13c5dd8cc018286c38f6996e98b35f1
tree80092ec432ee3fa8cf5689cd9e01e5bd6cee38cc
parent3c1646ac98cd08f6f7869be09c375c51cbac643b
net: sched: fix static key imbalance in case of ingress/clsact_init error

Move static key increments to the beginning of the init function
so they pair 1:1 with decrements in ingress/clsact_destroy,
which is called in case ingress/clsact_init fails.

Fixes: d3b0101d3512 ("net: sched: introduce tcf block infractructure")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_ingress.c