[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080822101526.GC14345@gondor.apana.org.au>
Date: Fri, 22 Aug 2008 20:15:26 +1000
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Jarek Poplawski <jarkao2@...il.com>
Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
denys@...p.net.lb
Subject: Re: [PATCH take 2] pkt_sched: Fix qdisc list locking
On Fri, Aug 22, 2008 at 09:27:30AM +0000, Jarek Poplawski wrote:
>
> pkt_sched: Fix qdisc list locking
>
> Since some qdiscs call qdisc_tree_decrease_qlen() (so qdisc_lookup())
> without rtnl_lock(), adding and deleting from a qdisc list needs
> additional locking. This patch adds global spinlock qdisc_list_lock
> and wrapper functions for modifying the list. It is considered as a
> temporary solution until hfsc_dequeue(), netem_dequeue() and
> tbf_dequeue() (or qdisc_tree_decrease_qlen()) are redone.
>
> With feedback from Herbert Xu and David S. Miller.
>
> Signed-off-by: Jarek Poplawski <jarkao2@...il.com>
Acked-by: Herbert Xu <herbert@...dor.apana.org.au>
> +void qdisc_list_del(struct Qdisc *q)
> +{
> + if ((q->parent != TC_H_ROOT) && !(q->flags & TCQ_F_INGRESS)) {
Good catch! I'm not sure whether this would actually break but
it certainly makes me feel a lot better :)
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