From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, jhs@mojatatu.com, mlxsw@mellanox.com
Subject: [patch net-next] net: sched: atm: destroy main filter chain
Date: Fri, 24 Mar 2017 14:39:49 +0100 [thread overview]
Message-ID: <1490362789-7293-1-git-send-email-jiri@resnulli.us> (raw)
From: Jiri Pirko <jiri@mellanox.com>
In atm_tc_destroy, the flow qdisc filter chains are destroyed. However
the main chain is not. So fix this memory and reference leak.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
Sending this for net-next because this is present at least from the
beginning of git epoch. Feel free to apply on -net, however I don't have
"Fixes: " :)
---
net/sched/sch_atm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c
index 2209c2d..56421da 100644
--- a/net/sched/sch_atm.c
+++ b/net/sched/sch_atm.c
@@ -560,6 +560,9 @@ static void atm_tc_destroy(struct Qdisc *sch)
struct atm_flow_data *flow, *tmp;
pr_debug("atm_tc_destroy(sch %p,[qdisc %p])\n", sch, p);
+
+ tcf_destroy_chain(&p->link.filter_list);
+
list_for_each_entry(flow, &p->flows, list)
tcf_destroy_chain(&flow->filter_list);
--
2.7.4
next reply other threads:[~2017-03-24 13:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 13:39 Jiri Pirko [this message]
2017-03-24 17:46 ` [patch net-next] net: sched: atm: destroy main filter chain Cong Wang
2017-03-24 17:55 ` Jiri Pirko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1490362789-7293-1-git-send-email-jiri@resnulli.us \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=mlxsw@mellanox.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).