summaryrefslogtreecommitdiff
path: root/net/sched/act_api.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-11-04 03:26:51 +0300
committerDavid S. Miller <davem@davemloft.net>2017-11-04 03:26:51 +0300
commit2a171788ba7bb61995e98e8163204fc7880f63b2 (patch)
tree4150a94dd08323748116e5051e56ddee830d4812 /net/sched/act_api.c
parentbf5345882bd18bc1b4966d170c0491ebe5c9a7d6 (diff)
parentd4c2e9fca5b7db8d315d93a072e65d0847f8e0c5 (diff)
downloadlinux-2a171788ba7bb61995e98e8163204fc7880f63b2.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Files removed in 'net-next' had their license header updated in 'net'. We take the remove from 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_api.c')
-rw-r--r--net/sched/act_api.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index c67b820a8307..ff4d69082376 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -80,6 +80,7 @@ static void tcf_idr_remove(struct tcf_idrinfo *idrinfo, struct tc_action *p)
spin_lock_bh(&idrinfo->lock);
idr_remove_ext(&idrinfo->action_idr, p->tcfa_index);
spin_unlock_bh(&idrinfo->lock);
+ put_net(idrinfo->net);
gen_kill_estimator(&p->tcfa_rate_est);
free_tcf(p);
}
@@ -88,6 +89,8 @@ int __tcf_idr_release(struct tc_action *p, bool bind, bool strict)
{
int ret = 0;
+ ASSERT_RTNL();
+
if (p) {
if (bind)
p->tcfa_bindcnt--;
@@ -336,6 +339,7 @@ err3:
p->idrinfo = idrinfo;
p->ops = ops;
INIT_LIST_HEAD(&p->list);
+ get_net(idrinfo->net);
*a = p;
return 0;
}