diff options
author | Paul Blakey <paulb@mellanox.com> | 2020-02-16 12:01:23 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2020-02-19 17:49:48 -0800 |
commit | 43719298193224c9a76c355de1622bd70242bc08 (patch) | |
tree | af26f1d99e8d2bb9b429a8e078577eaefe1c1efb /net/sched | |
parent | 7d17c544cd304c15317e64ac77617bc774fb3f55 (diff) | |
download | linux-43719298193224c9a76c355de1622bd70242bc08.tar.bz2 |
net: sched: Change the block's chain list to an rcu list
To allow lookup of a block's chain under atomic context.
Co-developed-by: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/cls_api.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index bbd8b5e7b74b..a634c85f1e0e 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -22,6 +22,7 @@ #include <linux/idr.h> #include <linux/rhashtable.h> #include <linux/jhash.h> +#include <linux/rculist.h> #include <net/net_namespace.h> #include <net/sock.h> #include <net/netlink.h> @@ -354,7 +355,7 @@ static struct tcf_chain *tcf_chain_create(struct tcf_block *block, chain = kzalloc(sizeof(*chain), GFP_KERNEL); if (!chain) return NULL; - list_add_tail(&chain->list, &block->chain_list); + list_add_tail_rcu(&chain->list, &block->chain_list); mutex_init(&chain->filter_chain_lock); chain->block = block; chain->index = chain_index; @@ -394,7 +395,7 @@ static bool tcf_chain_detach(struct tcf_chain *chain) ASSERT_BLOCK_LOCKED(block); - list_del(&chain->list); + list_del_rcu(&chain->list); if (!chain->index) block->chain0.chain = NULL; |