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]
Message-Id: <20080827.022633.132959334.davem@davemloft.net>
Date:	Wed, 27 Aug 2008 02:26:33 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	herbert@...dor.apana.org.au
Cc:	jarkao2@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] pkt_sched: Fix gen_estimator locks

From: Herbert Xu <herbert@...dor.apana.org.au>
Date: Tue, 26 Aug 2008 22:57:38 +1000

> Jarek Poplawski <jarkao2@...il.com> wrote:
> > pkt_sched: Fix gen_estimator locks
> > 
> > While passing a qdisc root lock to gen_new_estimator() and
> > gen_replace_estimator() dev could be deactivated or even before
> > grafting proper root qdisc as qdisc_sleeping (e.g. qdisc_create),
> > so using qdisc_root_lock() is not enough. This patch adds
> > qdisc_root_sleeping_lock() for this, plus additional checks, where
> > necessary.
> > 
> > 
> > Signed-off-by: Jarek Poplawski <jarkao2@...il.com>
> 
> Looks good.

Applied.

> > @@ -830,9 +830,16 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue,
> >                        sch->stab = stab;
> >                }
> >                if (tca[TCA_RATE]) {
> > +                       spinlock_t *root_lock;
> > +
> > +                       if ((sch->parent != TC_H_ROOT) &&
> > +                           !(sch->flags & TCQ_F_INGRESS))
> > +                               root_lock = qdisc_root_sleeping_lock(sch);
> > +                       else
> > +                               root_lock = qdisc_lock(sch);
> 
> Another reason why we should just have pointers to the root.

Yes root pointers would be useful, but they wouldn't kill these tests
:-)

Here in qdisc_create() we might be creating the new root, and we'd
still thus need a conditional for that case.
--
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