net: sched: use reference counting for tcf blocks on rules update
authorVlad Buslov <vladbu@mellanox.com>
Mon, 24 Sep 2018 16:22:58 +0000 (19:22 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Sep 2018 03:17:36 +0000 (20:17 -0700)
commit787ce6d02d95d01eb8633865eb5b2be1f7c94883
tree1a42fbc8920ccbe2d8b7647610bbd9fbd1d74854
parent0607e439943bd150e53eed2979f9c69aa61c37ce
net: sched: use reference counting for tcf blocks on rules update

In order to remove dependency on rtnl lock on rules update path, always
take reference to block while using it on rules update path. Change
tcf_block_get() error handling to properly release block with reference
counting, instead of just destroying it, in order to accommodate potential
concurrent users.

Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_api.c