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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 06 Aug 2008 23:37:03 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	stephen.hemminger@...tta.com
Cc:	kaber@...sh.net, netdev@...r.kernel.org
Subject: Re: [PATCH] net: trap attempts to modify noop qdisc

From: Stephen Hemminger <stephen.hemminger@...tta.com>
Date: Wed, 6 Aug 2008 23:15:16 -0700

> On Wed, 06 Aug 2008 23:11:59 -0700 (PDT)
> David Miller <davem@...emloft.net> wrote:
> 
> > From: Stephen Hemminger <stephen.hemminger@...tta.com>
> > Date: Wed, 6 Aug 2008 23:08:50 -0700
> > 
> > > Since noop qdisc is a singleton, it shouldn't end up with any other
> > > qdisc's on it's list, and it shouldn't be deleted.
> > > 
> > > Dave, this should help you find the bug.
> > 
> > Thanks.
> 
> I think the root of your problem (bad pun) is that the new code
> is assuming that changes to the root are done with parent handle of 0,
> but the API is for the parent handle to be TC_H_ROOT (0xFFFFFFFFU).

This is what I just committed to net-2.6, please give it a whirl.

pkt_sched: Fix "parent is root" test in qdisc_create().

As noticed by Stephen Hemminger, the root qdisc is denoted by
TC_H_ROOT, not zero.

Signed-off-by: David S. Miller <davem@...emloft.net>
---
 net/sched/sch_api.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 4840aff..83b23b5 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -792,7 +792,7 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue,
 				goto err_out3;
 			}
 		}
-		if (parent && !(sch->flags & TCQ_F_INGRESS))
+		if ((parent != TC_H_ROOT) && !(sch->flags & TCQ_F_INGRESS))
 			list_add_tail(&sch->list, &dev_queue->qdisc->list);
 
 		return sch;
-- 
1.5.6.5.GIT


--
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