]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: protect chain->explicitly_created with block->lock
authorVlad Buslov <vladbu@mellanox.com>
Mon, 11 Feb 2019 08:55:33 +0000 (10:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Feb 2019 18:41:32 +0000 (13:41 -0500)
commitf9006cb5b57b88a0dcb59b867eed381002edc9d9
treec2eae211be987d6412a72a8c73edb0c345c296af
parente236f97ac9ef6c89653d46477dcd66703940c6e8
net: sched: protect chain->explicitly_created with block->lock

In order to remove dependency on rtnl lock, protect
tcf_chain->explicitly_created flag with block->lock. Consolidate code that
checks and resets 'explicitly_created' flag into __tcf_chain_put() to
execute it atomically with rest of code that puts chain reference.

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