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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1KXy78-0000mY-00@gondolin.me.apana.org.au>
Date:	Tue, 26 Aug 2008 22:57:38 +1000
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	jarkao2@...il.com (Jarek Poplawski)
Cc:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] pkt_sched: Fix gen_estimator locks

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.

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

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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