From: Petr Machata <petrm@nvidia.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: <netdev@vger.kernel.org>,
<syzbot+b33c1cb0a30ebdc8a5f9@syzkaller.appspotmail.com>,
<syzbot+e5ea5f8a3ecfd4427a1c@syzkaller.appspotmail.com>,
Petr Machata <petrm@mellanox.com>
Subject: Re: [Patch net] net_sched: fix error path in red_init()
Date: Fri, 28 Aug 2020 13:08:46 +0200 [thread overview]
Message-ID: <87lfhzdo3l.fsf@nvidia.com> (raw)
In-Reply-To: <20200827174041.13300-1-xiyou.wangcong@gmail.com>
Cong Wang <xiyou.wangcong@gmail.com> writes:
> When ->init() fails, ->destroy() is called to clean up.
> So it is unnecessary to clean up in red_init(), and it
> would cause some refcount underflow.
Hmm, yeah, qdisc_put() would get called twice. A surprising API, the
init needs to make sure to always bring the qdisc into destroyable
state. But qevents are like that after kzalloc, so the fix looks
correct.
Reviewed-by: Petr Machata <petrm@nvidia.com>
Thanks!
next prev parent reply other threads:[~2020-08-28 11:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 17:40 [Patch net] net_sched: fix error path in red_init() Cong Wang
2020-08-28 11:08 ` Petr Machata [this message]
2020-08-28 14:17 ` David Miller
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=87lfhzdo3l.fsf@nvidia.com \
--to=petrm@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=petrm@mellanox.com \
--cc=syzbot+b33c1cb0a30ebdc8a5f9@syzkaller.appspotmail.com \
--cc=syzbot+e5ea5f8a3ecfd4427a1c@syzkaller.appspotmail.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;
as well as URLs for NNTP newsgroup(s).