From: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
To: Eric Dumazet <eric.dumazet@gmail.com>,
Vinicius Costa Gomes <vinicius.gomes@intel.com>
Cc: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org,
jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
andre.guedes@intel.com, ivan.briano@intel.com,
boon.leong.ong@intel.com, richardcochran@gmail.com,
henrik@austad.us, levipearson@gmail.com, rodney.cummings@ni.com
Subject: Re: [next-queue PATCH v3 2/4] net/sched: Fix accessing invalid dev_queue
Date: Wed, 4 Oct 2017 10:42:34 -0700 [thread overview]
Message-ID: <26439d1d-9fdf-cf1a-42fa-8c950fe00d15@intel.com> (raw)
In-Reply-To: <1507088831.8061.41.camel@edumazet-glaptop3.roam.corp.google.com>
Hi,
On 10/03/2017 08:47 PM, Eric Dumazet wrote:
> On Tue, 2017-10-03 at 16:44 -0700, Vinicius Costa Gomes wrote:
>> From: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
>>
>> In qdisc_alloc() the dev_queue pointer was used without any checks being
>> performed. If qdisc_create() gets a null dev_queue pointer, it just
>> passes it along to qdisc_alloc(), leading to a crash. That happens if a
>> root qdisc implements select_queue() and returns a null dev_queue
>> pointer for an "invalid handle", for example.
>>
>> One way to reproduce that is:
>>
>> 1) Setup mqprio
>> $ tc qdisc replace dev enp3s0 parent root mqprio num_tc 3 \
>> map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@0 1@1 2@2 hw 0
>>
>> 2) Replace the first inner qdisc
>> $ tc qdisc replace dev enp3s0 parent 8001:1 pfifo_fast
>>
>> This will lead to the following crash:
>
> When was this bug added ?
>
> If this is a consequence of your prior patch (1/4), then this must come
> before it.
>
> No need to add a stack trace for a not existing bug.
> Instead, explain in the changelog that it is a prep work.
>
> We try to not break the tree on purpose, so that future bisection will
> not hit a point where the kernel crashes.
Sure, that makes absolute sense. It'll be fixed in our v5 as you've suggested.
Thanks,
Jesus
next prev parent reply other threads:[~2017-10-04 17:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-03 23:44 [next-queue PATCH v3 0/4] TSN: Add qdisc based config interface for CBS Vinicius Costa Gomes
2017-10-03 23:44 ` [next-queue PATCH v3 1/4] mqprio: Implement select_queue class_ops Vinicius Costa Gomes
2017-10-03 23:44 ` [next-queue PATCH v3 2/4] net/sched: Fix accessing invalid dev_queue Vinicius Costa Gomes
2017-10-04 3:47 ` Eric Dumazet
2017-10-04 17:42 ` Jesus Sanchez-Palencia [this message]
2017-10-03 23:44 ` [next-queue PATCH v3 3/4] net/sched: Introduce Credit Based Shaper (CBS) qdisc Vinicius Costa Gomes
2017-10-03 23:44 ` [next-queue PATCH v2 3/5] net/sched: Introduce the user API for the CBS shaper Vinicius Costa Gomes
2017-10-03 23:55 ` Vinicius Costa Gomes
2017-10-03 23:44 ` [next-queue PATCH v3 4/4] igb: Add support for CBS offload Vinicius Costa Gomes
2017-10-03 23:44 ` [next-queue PATCH v2 4/5] net/sched: Introduce Credit Based Shaper (CBS) qdisc Vinicius Costa Gomes
2017-10-03 23:44 ` [next-queue PATCH v2 5/5] igb: Add support for CBS offload Vinicius Costa Gomes
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=26439d1d-9fdf-cf1a-42fa-8c950fe00d15@intel.com \
--to=jesus.sanchez-palencia@intel.com \
--cc=andre.guedes@intel.com \
--cc=boon.leong.ong@intel.com \
--cc=eric.dumazet@gmail.com \
--cc=henrik@austad.us \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=ivan.briano@intel.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=levipearson@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=rodney.cummings@ni.com \
--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;
as well as URLs for NNTP newsgroup(s).