diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-11-07 12:30:18 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-11-07 12:30:18 +0300 |
commit | 15bcdc9477b03eb035052412c3a087e11e855e76 (patch) | |
tree | e1e3c1f2b89e3a705d1737d61a4d8a9394a1930e /include/net/act_api.h | |
parent | 340b5319c98eb14f7a70947a38e17d06f5beea88 (diff) | |
parent | e4880bc5dfb1f02b152e62a894b5c6f3e995b3cf (diff) | |
download | linux-15bcdc9477b03eb035052412c3a087e11e855e76.tar.xz |
Merge branch 'linus' into perf/core, to fix conflicts
Conflicts:
tools/perf/arch/arm/annotate/instructions.c
tools/perf/arch/arm64/annotate/instructions.c
tools/perf/arch/powerpc/annotate/instructions.c
tools/perf/arch/s390/annotate/instructions.c
tools/perf/arch/x86/tests/intel-cqm.c
tools/perf/ui/tui/progress.c
tools/perf/util/zlib.c
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/net/act_api.h')
-rw-r--r-- | include/net/act_api.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/net/act_api.h b/include/net/act_api.h index b944e0eb93be..1e6df0eb058f 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __NET_ACT_API_H #define __NET_ACT_API_H @@ -13,6 +14,7 @@ struct tcf_idrinfo { spinlock_t lock; struct idr action_idr; + struct net *net; }; struct tc_action_ops; @@ -104,7 +106,7 @@ struct tc_action_net { static inline int tc_action_net_init(struct tc_action_net *tn, - const struct tc_action_ops *ops) + const struct tc_action_ops *ops, struct net *net) { int err = 0; @@ -112,6 +114,7 @@ int tc_action_net_init(struct tc_action_net *tn, if (!tn->idrinfo) return -ENOMEM; tn->ops = ops; + tn->idrinfo->net = net; spin_lock_init(&tn->idrinfo->lock); idr_init(&tn->idrinfo->action_idr); return err; @@ -122,7 +125,9 @@ void tcf_idrinfo_destroy(const struct tc_action_ops *ops, static inline void tc_action_net_exit(struct tc_action_net *tn) { + rtnl_lock(); tcf_idrinfo_destroy(tn->ops, tn->idrinfo); + rtnl_unlock(); kfree(tn->idrinfo); } |