Skip to content

Commit

Permalink
net: Convert cangw_pernet_ops
Browse files Browse the repository at this point in the history
These pernet_operations have a deal with cgw_list,
and the rest of accesses are made under rtnl_lock().
The only exception is cgw_dump_jobs(), which is
accessed under rcu_read_lock(). cgw_dump_jobs() is
called on netlink request, and it does not seem,
foreign pernet_operations want to send a net such
the messages. So, we mark them as async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Kirill Tkhai authored and David S. Miller committed Mar 5, 2018
1 parent d217472 commit 111da7a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/can/gw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,7 @@ static void __net_exit cangw_pernet_exit(struct net *net)
static struct pernet_operations cangw_pernet_ops = {
.init = cangw_pernet_init,
.exit = cangw_pernet_exit,
.async = true,
};

static __init int cgw_module_init(void)
Expand Down

0 comments on commit 111da7a

Please sign in to comment.