Skip to content

Commit

Permalink
net: Convert subsys_initcall() registered pernet_operations from net/…
Browse files Browse the repository at this point in the history
…sched

psched_net_ops only creates and destroyes /proc entry,
and safe to be executed in parallel with any foreigh
pernet_operations.

tcf_action_net_ops initializes and destructs tcf_action_net::egdev_ht,
which is not touched by foreign pernet_operations.

So, make them async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Acked-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Kirill Tkhai authored and David S. Miller committed Feb 13, 2018
1 parent 86b6341 commit 13da199
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions net/sched/act_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,7 @@ static struct pernet_operations tcf_action_net_ops = {
.exit = tcf_action_net_exit,
.id = &tcf_action_net_id,
.size = sizeof(struct tcf_action_net),
.async = true,
};

static int __init tc_action_init(void)
Expand Down
1 change: 1 addition & 0 deletions net/sched/sch_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -2128,6 +2128,7 @@ static void __net_exit psched_net_exit(struct net *net)
static struct pernet_operations psched_net_ops = {
.init = psched_net_init,
.exit = psched_net_exit,
.async = true,
};

static int __init pktsched_init(void)
Expand Down

0 comments on commit 13da199

Please sign in to comment.