Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Miller <davem@...>
Cc: <herbert@...>, <netdev@...>, <denys@...>
Date: Monday, August 18, 2008 - 4:12 pm

David Miller wrote, On 08/18/2008 12:32 AM:
...

Probably simple for you, but I'm not even sure of this. If it were
true there would be no this and a few other threads concerned with
this.


I don't think it's true. What matters here is the qdisc lock. And
within the qdisc's tree only one such lock can matter because current
code doesn't use qdisc locks on lower levels. So we need to take this
one top lock. But as we have seen in notify_and_destroy() or
qdisc_watchdog() it's easy to do this wrong because you've always
analyze the tree plus activated/deactivated state. My proposal is to
simply have still this one lock but easy accessible at some well
known place (actually, with an exception for builtin qdiscs).


Actually, after partly fixing this we have currently messed this up
again. We can't destroy a qdisc without RCU or some other delayed
method while we're holding a lock inside this - and this is a case
of root qdiscs... It's quite simple too, but why we've missed this
so easily?

As mentioned there was also this tricky qdisc_watchdog (or other
direct __netif_scheduling), but this is not all. Try to look at
qdisc_create() and gen_new_estimator() call. It passes
qdisc_root_lock(sch) somewhere. This is similar to qdisc_watchdog()
problem, but are you really sure we always save the right spinlock
here? I don't think so.

So, of course, if you think such problems are exceptional, and will
not return after current fixes, then we can continue, no problem
for me, but I'm not sure how about Denys or other testers and users.

Jarek P.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock()., Jarek Poplawski, (Mon Aug 11, 4:53 pm)
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_loc..., Jarek Poplawski, (Mon Aug 18, 4:12 pm)
[PATCH take 2] pkt_sched: Fix qdisc list locking, Jarek Poplawski, (Fri Aug 22, 5:27 am)
Re: [PATCH take 2] pkt_sched: Fix qdisc list locking, David Miller, (Fri Aug 22, 6:23 am)
Re: [PATCH take 2] pkt_sched: Fix qdisc list locking, Herbert Xu, (Fri Aug 22, 6:15 am)
Re: [PATCH take 2] pkt_sched: Fix qdisc list locking, David Miller, (Fri Aug 22, 6:28 am)
[PATCH] pkt_sched: Fix qdisc list locking, Jarek Poplawski, (Fri Aug 22, 4:41 am)
Re: [PATCH] pkt_sched: Fix qdisc list locking, Herbert Xu, (Fri Aug 22, 6:14 am)
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_loc..., Stephen Hemminger, (Sun Aug 24, 7:26 pm)
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_loc..., Stephen Hemminger, (Sun Aug 24, 8:29 pm)
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_loc..., Stephen Hemminger, (Tue Aug 26, 8:24 am)
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_loc..., Stephen Hemminger, (Tue Aug 26, 8:50 am)
RE: [PATCH take 2] pkt_sched: Fix qdisc_watchdog() vs. dev_d..., Duyck, Alexander H, (Mon Sep 15, 7:44 pm)
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_loc..., Denys Fedoryshchenko, (Mon Aug 18, 2:08 am)