[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1414197626.20845.51.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Fri, 24 Oct 2014 17:40:26 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Cong Wang <cwang@...pensource.com>
Cc: Cong Wang <xiyou.wangcong@...il.com>,
netdev <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>,
Wang Bo <wang.bo116@....com.cn>,
John Fastabend <john.r.fastabend@...el.com>,
Eric Dumazet <edumazet@...gle.com>,
Patrick McHardy <kaber@...sh.net>, Terry Lam <vtlam@...gle.com>
Subject: Re: [Patch net 2/2] net_sched: always call ->destroy when ->init()
fails
On Fri, 2014-10-24 at 17:36 -0700, Cong Wang wrote:
> >> static int multiq_dump(struct Qdisc *sch, struct sk_buff *skb)
> >> diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c
> >> index 3ec7e88..55ac6a4 100644
> >> --- a/net/sched/sch_qfq.c
> >> +++ b/net/sched/sch_qfq.c
> >> @@ -522,7 +522,6 @@ static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
> >> return 0;
> >>
> >> destroy_class:
> >> - qdisc_destroy(cl->qdisc);
> >> kfree(cl);
> >> return err;
> >> }
> >
> >
> > Really ? I am calling this a leak of cl->qdisc.
> >
> >
>
> How? I already added a comment on qdisc_create_dflt(), callers don't
> need to clean up
> on failure path.
Seriously, can you read the function again ?
What happens if gen_new_estimator() fails ?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists