From: Yang Yingliang <yangyingliang@huawei•com>
To: Eric Dumazet <eric.dumazet@gmail•com>
Cc: <davem@davemloft•net>, <netdev@vger•kernel.org>,
<brouer@redhat•com>, <jpirko@redhat•com>, <jbrouer@redhat•com>
Subject: Re: [PATCH net v4 1/2] net: sched: tbf: fix calculation of max_size
Date: Tue, 3 Dec 2013 14:09:06 +0800 [thread overview]
Message-ID: <529D7582.7010108@huawei.com> (raw)
In-Reply-To: <1386046268.30495.5.camel@edumazet-glaptop2.roam.corp.google.com>
On 2013/12/3 12:51, Eric Dumazet wrote:
> On Tue, 2013-12-03 at 11:26 +0800, Yang Yingliang wrote:
>
>> + if (qopt->rate.linklayer == TC_LINKLAYER_UNAWARE) {
>> + rtab = qdisc_get_rtab(&qopt->rate, tb[TCA_TBF_RTAB]);
>> + if (rtab) {
>> + qdisc_put_rtab(rtab);
>> + rtab = NULL;
>> + }
>> }
>
> Please make remove rtab use to make sure you dont leak a pointer.
>
> if (qopt->rate.linklayer == TC_LINKLAYER_UNAWARE)
> qdisc_put_rtab(qdisc_get_rtab(&qopt->rate,
> tb[TCA_TBF_RTAB]));
>
>
>> + if (qopt->peakrate.linklayer == TC_LINKLAYER_UNAWARE) {
>> + ptab = qdisc_get_rtab(&qopt->peakrate, tb[TCA_TBF_PTAB]);
>> + if (ptab) {
>> + qdisc_put_rtab(ptab);
>> + ptab = NULL;
>> + }
>
> Same here for ptab
>
OK, Thanks!
Regards,
Yang
next prev parent reply other threads:[~2013-12-03 6:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-03 3:26 [PATCH net v4 0/2] net: sched: fix some issues Yang Yingliang
2013-12-03 3:26 ` [PATCH net v4 1/2] net: sched: tbf: fix calculation of max_size Yang Yingliang
2013-12-03 4:51 ` Eric Dumazet
2013-12-03 6:09 ` Yang Yingliang [this message]
2013-12-03 4:59 ` Eric Dumazet
2013-12-03 7:44 ` Yang Yingliang
2013-12-03 8:12 ` Eric Dumazet
2013-12-03 9:47 ` Yang Yingliang
2013-12-03 11:32 ` Yang Yingliang
2013-12-03 14:51 ` Eric Dumazet
2013-12-04 1:53 ` Yang Yingliang
2013-12-03 3:26 ` [PATCH net v4 2/2] net: sched: htb: fix calculation of quantum Yang Yingliang
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=529D7582.7010108@huawei.com \
--to=yangyingliang@huawei$(echo .)com \
--cc=brouer@redhat$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=eric.dumazet@gmail$(echo .)com \
--cc=jbrouer@redhat$(echo .)com \
--cc=jpirko@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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