netdev
[Top] [All Lists]

Re: [PATCH 2.6] fix deadlock with ip_queue and tcp local input path

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH 2.6] fix deadlock with ip_queue and tcp local input path
From: Harald Welte <laforge@xxxxxxxxxxxxx>
Date: Fri, 27 May 2005 09:37:58 +0200
Cc: netfilter-devel@xxxxxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx, jmorris@xxxxxxxxxx
In-reply-to: <E1DbQ49-00027X-00@gondolin.me.apana.org.au>
Mail-followup-to: Harald Welte <laforge@xxxxxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, netfilter-devel@xxxxxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx, jmorris@xxxxxxxxxx
References: <20050526142420.GD13114@sunbeam.de.gnumonks.org> <E1DbQ49-00027X-00@gondolin.me.apana.org.au>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: mutt-ng 1.5.8-r168i (Debian)
On Fri, May 27, 2005 at 07:38:57AM +1000, Herbert Xu wrote:
> Harald Welte <laforge@xxxxxxxxxxxxx> wrote:
> > 
> > The patch below adds an additional queue for ip_queue verdicts.  They
> > come up from userspace, are appended to a queue which is then processed
> > by a tasklet.  The tasklet itself runs in softirq context, so when timer
> > hardirq leaves, no tcp_delack_timer() will be executed until
> > nf_reinject() has finished.
> 
> This seems to be overly complicated if all you want is to do this in
> softirq context.  What's wrong with simply alling local_bh_disable?

Patrick just pointed this out, too.  I wasn't sure whether
local_bh_disable() would make the context really look like softirq in
every way.  If yes, it would certainly solve the problem, because
in_interrupt() at hardirq-exit would be true and therefore the timer
softirq not scheduled immediately.

I'll have Astaro test this variant.

-- 
- Harald Welte <laforge@xxxxxxxxxxxxx>                 http://netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie

Attachment: pgpqAeIiSemTM.pgp
Description: PGP signature

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