From: Patrick McHardy <kaber@trash.net>
To: Jarek Poplawski <jarkao2@o2.pl>
Cc: Ranko Zivojnovic <ranko@spidernet.net>, netdev@vger.kernel.org
Subject: Re: [NET]: gen_estimator deadlock fix
Date: Tue, 17 Jul 2007 14:01:48 +0200 [thread overview]
Message-ID: <469CAFAC.9010301@trash.net> (raw)
In-Reply-To: <20070717120436.GC2049@ff.dom.local>
Jarek Poplawski wrote:
> This patch looks fine, but while checking for this lock I've found
> another strange thing: for actions tcfc_stats_lock is used here, which
> is equivalent to tcfc_lock; so, in gen_kill_estimator we get this lock
> sometimes after dev->queue_lock; this order is also possible during
> tc_classify if actions are used; on the other hand act_mirred calls
> dev_queue_xmit under this lock, so dev->queue_lock is taken in another
> order. I hope it's with different devs, and there is no real deadlock
> possible, but this all is a bit queer...
It *should* be a different device, but AFAIK nothing enforces this.
There are quite a few possible deadlocks with TC actions, mid-term
things like the mirred action need to be redesigned to inject packet
from a different context.
> I don't know actions enough, but it seems, if it's possible that they
> are always run only from tc_classify, with dev->queue_lock, maybe it
> would be simpler to use this lock for actions' stats with
> gen_estimator too.
The same action can be shared between devices, so they need seperate
locks.
next prev parent reply other threads:[~2007-07-17 12:01 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
2007-07-17 12:04 ` Jarek Poplawski
2007-07-17 12:01 ` Patrick McHardy [this message]
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=469CAFAC.9010301@trash.net \
--to=kaber@trash.net \
--cc=jarkao2@o2.pl \
--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).