From: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
To: David Miller <davem@davemloft.net>
Cc: vinicius.gomes@intel.com, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, jiri@resnulli.us,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: sched: sch_taprio: fix memleak in error path for sched list parse
Date: Wed, 7 Aug 2019 01:42:12 +0300 [thread overview]
Message-ID: <20190806224210.GA3337@khorivan> (raw)
In-Reply-To: <20190806.114114.1672670570404825284.davem@davemloft.net>
On Tue, Aug 06, 2019 at 11:41:14AM -0700, David Miller wrote:
>From: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
>Date: Tue, 6 Aug 2019 13:04:25 +0300
>
>> Based on net/master
>
>I wonder about that because:
Applies cleanly on net/master, but line num is not correct.
I've sent v2.
>
>> --- a/net/sched/sch_taprio.c
>> +++ b/net/sched/sch_taprio.c
>> @@ -1451,7 +1451,8 @@ static int taprio_change(struct Qdisc *sch, struct nlattr *opt,
>> spin_unlock_bh(qdisc_lock(sch));
>>
>> free_sched:
>> - kfree(new_admin);
>> + if (new_admin)
>> + call_rcu(&new_admin->rcu, taprio_free_sched_cb);
>>
>> return err;
>
>In my tree the context around line 1451 is:
>
> nla_nest_end(skb, sched_nest);
>
>done:
> rcu_read_unlock();
>
> return nla_nest_end(skb, nest);
>
>
>which is part of function taprio_dump().
>
>Please respin this properly against current 'net' sources.
--
Regards,
Ivan Khoronzhuk
prev parent reply other threads:[~2019-08-06 22:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-06 10:04 [PATCH] net: sched: sch_taprio: fix memleak in error path for sched list parse Ivan Khoronzhuk
2019-08-06 16:21 ` Vinicius Costa Gomes
2019-08-06 18:41 ` David Miller
2019-08-06 22:42 ` Ivan Khoronzhuk [this message]
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=20190806224210.GA3337@khorivan \
--to=ivan.khoronzhuk@linaro.org \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vinicius.gomes@intel.com \
--cc=xiyou.wangcong@gmail.com \
/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