Subject: Re: [PATCH] PKT_SCHED: Initialize list field in dummy qdiscs

From: Thomas Graf <[email-masked]>
Date: Fri, 5 Nov 2004 20:43:03 +0100

* Patrick McHardy <[email-masked]> 2004-11-05 19:18
> Yes, but there doesn't seem to be a path where this is true.

I will double check this, there must be something wrong with
one of the callers to qdisc_destroy since it's the only way
entries can be removed from qdisc_list and otherwise the oops wouldn't
show up with the POISON1.

> __qdisc_destroy is called from a rcu-callback, not directly from
> qdisc_destroy.

You're indeed right, I haven't noticed queue_lock being a softirq
spinlock, stupid me.

So to have qdisc_destroy be reliable we should either make sure
dev->queue_lock is held for every call or switch to list_del_rcu.
since qdisc_destroy might be called from bh context.

I will audit all paths, I'm pretty sure the reported oops is
somehow related to this.