From: David Miller <davem@davemloft.net>
To: ranko@spidernet.net
Cc: kaber@trash.net, jarkao2@o2.pl, netdev@vger.kernel.org
Subject: Re: [NET]: gen_estimator deadlock fix
Date: Mon, 16 Jul 2007 18:28:53 -0700 (PDT) [thread overview]
Message-ID: <20070716.182853.121295652.davem@davemloft.net> (raw)
In-Reply-To: <1184607905.18564.50.camel@ranko-fc2.spidernet.net>
From: Ranko Zivojnovic <ranko@spidernet.net>
Date: Mon, 16 Jul 2007 20:45:05 +0300
> [NET] gen_estimator deadlock fix
>
> -Fixes ABBA deadlock noted by Patrick McHardy <kaber@trash.net>:
>
> > There is at least one ABBA deadlock, est_timer() does:
> > read_lock(&est_lock)
> > spin_lock(e->stats_lock) (which is dev->queue_lock)
> >
> > and qdisc_destroy calls htb_destroy under dev->queue_lock, which
> > calls htb_destroy_class, then gen_kill_estimator and this
> > write_locks est_lock.
>
> To fix the ABBA deadlock the rate estimators are now kept on an rcu list.
>
> -The est_lock changes the use from protecting the list to protecting
> the update to the 'bstat' pointer in order to avoid NULL dereferencing.
>
> -The 'interval' member of the gen_estimator structure removed as it is
> not needed.
>
> Signed-off-by: Ranko Zivojnovic <ranko@spidernet.net>
Applied, thanks.
next prev parent reply other threads:[~2007-07-17 1:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-11 13:41 [NET]: gen_estimator deadlock fix Ranko Zivojnovic
2007-07-12 7:37 ` Jarek Poplawski
2007-07-12 9:18 ` Ranko Zivojnovic
2007-07-12 9:40 ` Ranko Zivojnovic
2007-07-12 10:46 ` Jarek Poplawski
2007-07-12 11:47 ` Ranko Zivojnovic
2007-07-12 12:07 ` Patrick McHardy
2007-07-12 17:48 ` Ranko Zivojnovic
2007-07-13 12:17 ` Jarek Poplawski
2007-07-13 12:26 ` Ranko Zivojnovic
2007-07-13 13:42 ` Jarek Poplawski
2007-07-16 7:00 ` Jarek Poplawski
2007-07-16 13:03 ` Patrick McHardy
2007-07-16 17:45 ` Ranko Zivojnovic
2007-07-17 1:28 ` David Miller [this message]
2007-07-17 12:04 ` Jarek Poplawski
2007-07-17 12:01 ` Patrick McHardy
2007-07-17 12:28 ` Jarek Poplawski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070716.182853.121295652.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jarkao2@o2.pl \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=ranko@spidernet.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).