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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Jan 2018 19:31:12 +0000 (20:31 +0100)
commit11295730446fd654aeef28a575d801f3679424fa
treedcdc60588ebbf60cf7a68f50d6757340a3f64291
parent215b69e208089f42c29f9343ef11f4adc6ea6f6b
net: sched: fix static key imbalance in case of ingress/clsact_init error

[ Upstream commit b59e6979a86384e68b0ab6ffeab11f0034fba82d ]

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: 6529eaba33f0 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sched/sch_ingress.c