diff options
author | David S. Miller <davem@davemloft.net> | 2015-08-27 21:45:31 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-27 21:45:31 -0700 |
commit | 0d36938bb82a7775c21ce0a7429f08ba13d025b6 (patch) | |
tree | f502caf5555591ee237e14e5fa96b2c005a85036 /net/sched/cls_u32.c | |
parent | 55f14da66954083b621debbdbf62c7fc429291e8 (diff) | |
parent | 4941b8f0c2b9d88e8a6dacebf8b7faf603b98368 (diff) | |
download | blackbird-op-linux-0d36938bb82a7775c21ce0a7429f08ba13d025b6.tar.gz blackbird-op-linux-0d36938bb82a7775c21ce0a7429f08ba13d025b6.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/sched/cls_u32.c')
-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) |