]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: refactor tc_ctl_chain() to use block->lock
authorVlad Buslov <vladbu@mellanox.com>
Mon, 11 Feb 2019 08:55:34 +0000 (10:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Feb 2019 18:41:32 +0000 (13:41 -0500)
commitc08f147943a96d6d40f5a96b9d146873767c898e
tree0c7fcdb0554f25b1cfe3e1afdfc7b5620978b561
parentf9006cb5b57b88a0dcb59b867eed381002edc9d9
net: sched: refactor tc_ctl_chain() to use block->lock

In order to remove dependency on rtnl lock, modify chain API to use
block->lock to protect chain from concurrent modification. Rearrange
tc_ctl_chain() code to call tcf_chain_hold() while holding block->lock to
prevent concurrent chain removal.

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