lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <46A384B0.2030404@trash.net>
Date:	Sun, 22 Jul 2007 18:24:16 +0200
From:	Patrick McHardy <kaber@...sh.net>
To:	"Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@...el.com>
CC:	netdev@...r.kernel.org
Subject: Re: Question: how to detect if a qdisc is root or not?

Waskiewicz Jr, Peter P wrote:
>>I dont think I understand. Whats the problem with setting 
>>sch->parent on initialization instead on grafting as I did in 
>>my example patch?
>>Please explain the problems arrising on unload in detail.
> 
> 
> sch->parent is getting set on initialization, and for the root and
> ingress qdiscs, it's left at zero.  If I change that value, when the
> root qdisc is unloaded and pfifo_fast is put back into place, the
> qdisc_destroy() walks the tree and attempts to free memory from the
> handle pointed at by sch->parent.


First of all, qdisc destruction never propagates up, only down
the tree. Secondly neither qdisc_destroy nor pfifo nor prio
even look at sch->parent. So this is completely wrong, the only
place where sch->parent is used for walking through the tree
is qdisc_tree_decrease_qlen.

> It stops when sch->parent is NULL,

Where are you getting this? sch->parent is an *integer*.

> so
> sch->parent is actually being set as intended.  The only thing that
> confused me is that nowhere in the qdisc is TC_H_ROOT included
> explicitly, rather, the root qdisc is where sch->parent is NULL.
> 
> So I misunderstood what was actually wrong.  The qdisc code is ok as-is,
> it's just that the top-level qdisc (root and ingress) have a sch->parent
> of NULL, which is being set correctly today.
> 
> Hope that clarifies.

Not at all :)
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ