[Top] [All Lists]

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

To: David Miller <davem@xxxxxxxxxxxxx>
Subject: [PATCH 2.6] fix deadlock with ip_queue and tcp local input path
From: Harald Welte <laforge@xxxxxxxxxxxxx>
Date: Mon, 30 May 2005 20:06:54 +0200
Cc: Netfilter Development Mailinglist <netfilter-devel@xxxxxxxxxxxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <>
Mail-followup-to: Harald Welte <laforge@xxxxxxxxxxxxx>, David Miller <davem@xxxxxxxxxxxxx>, Netfilter Development Mailinglist <netfilter-devel@xxxxxxxxxxxxxxxxxxx>, netdev@xxxxxxxxxxx
References: <>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: mutt-ng 1.5.8-r168i (Debian)
On Thu, May 26, 2005 at 04:24:21PM +0200, Harald Welte wrote:
> When we have ip_queue being used from LOCAL_IN, then we end up with a
> situation where the verdicts coming back from userspace traverse the TCP
> input path from syscall context.  While this seems to work most of the
> time, there's an ungly deadlock:
> syscall context is interrupted by the timer interrupt.  When the timer
> interrupt leaves, the timer softirq get's scheduled and calls
> tcp_delack_timer() and alike.  They themselves do bh_lock_sock(sk),
> which is already held from somewhere else[1] -> boom.

I've now tested the suggested solution by Patrick McHardy and Herbert Xu to
simply use local_bh_{en,dis}able().

Please apply the following patch to mainline.

btw: How do we get this into 2.6.11.x ?

Signed-off-by: Harald Welte <laforge@xxxxxxxxxxxxx>

- Harald Welte <laforge@xxxxxxxxxxxxx>       
  "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: queue-local-reinject-smp-deadlock-fix-localbhdisable.patch
Description: Text document

Attachment: pgp79EMOEnQUJ.pgp
Description: PGP signature

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