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, 27 Aug 2008 11:09:39 +0000
From:	Jarek Poplawski <jarkao2@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	herbert@...dor.apana.org.au, netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] pkt_sched: Fix gen_estimator locks

On Wed, Aug 27, 2008 at 03:47:23AM -0700, David Miller wrote:
> From: Jarek Poplawski <jarkao2@...il.com>
> Date: Wed, 27 Aug 2008 10:44:58 +0000
> 
> > Yes, it should be simpler. (We can probably consider a pointer to
> > itself instead of NULL for root qdiscs, to skip testing for NULL e.g.
> > while getting a lock.) On the other hand, we lose with this the
> > possibility to easily determine which dev_queue is "the owner" of the
> > qdisc, or if some dev_queue contains a clone only.
> 
> For root qdiscs we can add a TCQ_F_SHARED flag for this purpose.

Yes, but we can't do something like this:

diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index e7fb9e0..a7f508c 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -235,6 +235,9 @@ struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle)
 		struct netdev_queue *txq = netdev_get_tx_queue(dev, i);
 		struct Qdisc *txq_root = txq->qdisc_sleeping;
 
+		/* skip the clones */
+		if (txq_root->dev_queue != txq)
+			continue;
 		q = qdisc_match_from_root(txq_root, handle);
 		if (q)
 			goto unlock;

Jarek P.
--
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