diff options
author | David S. Miller <davem@davemloft.net> | 2015-08-28 06:45:31 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-28 06:45:31 +0200 |
commit | 0d36938bb82a7775c21ce0a7429f08ba13d025b6 (patch) | |
tree | f502caf5555591ee237e14e5fa96b2c005a85036 /net/sched | |
parent | Merge branch 'iff_no_queue_fixups' (diff) | |
parent | Merge tag 'powerpc-4.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/po... (diff) | |
download | linux-0d36938bb82a7775c21ce0a7429f08ba13d025b6.tar.xz linux-0d36938bb82a7775c21ce0a7429f08ba13d025b6.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/cls_u32.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index cab9e9b43967..4fbb67430ce4 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c @@ -490,6 +490,19 @@ static bool u32_destroy(struct tcf_proto *tp, bool force) return false; } } + + if (tp_c->refcnt > 1) + return false; + + if (tp_c->refcnt == 1) { + struct tc_u_hnode *ht; + + for (ht = rtnl_dereference(tp_c->hlist); + ht; + ht = rtnl_dereference(ht->next)) + if (!ht_empty(ht)) + return false; + } } if (root_ht && --root_ht->refcnt == 0) |