All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: [NETFILTER 2.4 2/6]: Fix deadlock with ip_queue/ip6_queue
Date: Mon, 01 Aug 2005 02:42:25 +0200	[thread overview]
Message-ID: <42ED6FF1.2020803@trash.net> (raw)

[-- Attachment #1: 2.diff --]
[-- Type: text/x-patch, Size: 1316 bytes --]

[NETFILTER]: Fix deadlock with ip_queue/ip6_queue

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit 36d73751283413992a12837f7a6e4116b9e70d3f
tree cd19a0c9a2e183b887ef5fc8cfec8682fe3b24e3
parent 2a330e4e1da97267e1dd4a2ed3f8cd7cabdf21ca
author Patrick McHardy <kaber@trash.net> Sun, 31 Jul 2005 18:48:38 +0200
committer Patrick McHardy <kaber@trash.net> Sun, 31 Jul 2005 18:48:38 +0200

 net/ipv4/netfilter/ip_queue.c  |    2 ++
 net/ipv6/netfilter/ip6_queue.c |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c
--- a/net/ipv4/netfilter/ip_queue.c
+++ b/net/ipv4/netfilter/ip_queue.c
@@ -62,7 +62,9 @@ static DECLARE_MUTEX(ipqnl_sem);
 static void
 ipq_issue_verdict(struct ipq_queue_entry *entry, int verdict)
 {
+	local_bh_disable();
 	nf_reinject(entry->skb, entry->info, verdict);
+	local_bh_enable();
 	kfree(entry);
 }
 
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -68,7 +68,9 @@ static DECLARE_MUTEX(ipqnl_sem);
 static void
 ipq_issue_verdict(struct ipq_queue_entry *entry, int verdict)
 {
+	local_bh_disable();
 	nf_reinject(entry->skb, entry->info, verdict);
+	local_bh_enable();
 	kfree(entry);
 }
 

                 reply	other threads:[~2005-08-01  0:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=42ED6FF1.2020803@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=netfilter-devel@lists.netfilter.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.