netdev
[Top] [All Lists]

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

To: Patrick McHardy <kaber@xxxxxxxxx>
Subject: Re: [PATCH] PKT_SCHED: Initialize list field in dummy qdiscs
From: Thomas Graf <tgraf@xxxxxxx>
Date: Sat, 6 Nov 2004 02:18:43 +0100
Cc: davem@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx, spam@xxxxxxxxxxxxx, kuznet@xxxxxxxxxxxxx, jmorris@xxxxxxxxxx
In-reply-to: <20041105194303.GA12289@xxxxxxxxxxxxxx>
References: <418B4C7C.8000402@xxxxxxxxxxxxx> <20041105115430.GP19714@xxxxxxxxxxxxxx> <418B4C7C.8000402@xxxxxxxxxxxxx> <20041105141640.GQ19714@xxxxxxxxxxxxxx> <418BA66A.60804@xxxxxxxxx> <20041105163951.GY12289@xxxxxxxxxxxxxx> <418BB7D2.6060908@xxxxxxxxx> <20041105175812.GZ12289@xxxxxxxxxxxxxx> <418BC40E.8080402@xxxxxxxxx> <20041105194303.GA12289@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
* Thomas Graf <20041105194303.GA12289@xxxxxxxxxxxxxx> 2004-11-05 20:43
> * Patrick McHardy <418BC40E.8080402@xxxxxxxxx> 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.

I think I've found the problem and it sounds to banal to be true.
qdisc_destroy uses list_del when it used to use a manual list
management which would not interfer any list walkers. the list
walkers are not protected on UP systems, that's why it was
impossible to trigger it for me with SMP enabled. So a qdisc_list
walker such as qdisc_lookup could have its next pointer overwritten
with LIST_POISON1 while walking if qdisc_destroy is called in between?
It sounds so right but on the other hand all the callers except
dev_shutdown should be serialized with any of the list walkers by the
rtnl sempaphore.

I guess I'm missing that little bit of experience but it would
help to use _rcu list variantes, would it?

<Prev in Thread] Current Thread [Next in Thread>