All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart De Schuymer <bdschuym@pandora.be>
To: David S.Miller <davem@redhat.com>
Cc: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: [PATCH][Netfilter]: forgotten dev_put for bridge-devices in nf_reinject() in netfilter.c
Date: Sun, 15 Dec 2002 23:40:57 +0100	[thread overview]
Message-ID: <200212152340.57407.bdschuym@pandora.be> (raw)

Hello David,

The following patch was sent last Tuesday (5 days ago) on the netdev and 
netfilter-devel mailing lists and I don't see it in Linus' tree yet, so I 
thought I'd send it directly to you.

The patch is from Patrick McHardy <kaber@trash.net>.

The problem was caused by the bridge-netfilter patch from me. nf_queue() 
dev_holds the phys{in,out}dev devices, but nf_reinject() doesn't dev_put() 
them.

If this is already in your patch queue, my apologies, otherwise,
please apply,

Bart

--- linux-2.5.50/net/core/netfilter.c.orig	2002-12-10 14:16:20.000000000 +0100
+++ linux-2.5.50/net/core/netfilter.c	2002-12-10 14:19:23.000000000 +0100
@@ -574,7 +574,15 @@
 	/* Release those devices we held, or Alexey will kill me. */
 	if (info->indev) dev_put(info->indev);
 	if (info->outdev) dev_put(info->outdev);
-	
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
+	if (skb->nf_bridge) {
+		if (skb->nf_bridge->physindev)
+			dev_put(skb->nf_bridge->physindev);
+		if (skb->nf_bridge->physoutdev)
+			dev_put(skb->nf_bridge->physoutdev);
+	}
+#endif
+
 	kfree(info);
 	return;
 }

             reply	other threads:[~2002-12-15 22:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-15 22:40 Bart De Schuymer [this message]
2002-12-23  7:25 ` [PATCH][Netfilter]: forgotten dev_put for bridge-devices in nf_reinject() in netfilter.c David S. Miller

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=200212152340.57407.bdschuym@pandora.be \
    --to=bdschuym@pandora.be \
    --cc=davem@redhat.com \
    --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.