: forgotten dev_put for bridge-devices in nf_reinject() in netfilter.c
Subsystems (2)
PATCH 1/1 : forgotten dev_put for bridge-devices in nf_reinject() in netfilter.c
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 <[email protected]>.
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
net/core/netfilter.c renamed from net/core/netfilter.c.orig +9 -1
@@ -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 ; }
From: Bart De Schuymer <[email protected]>
Date: Sun, 15 Dec 2002 23:40:57 +0100
The patch is from Patrick McHardy <[email protected]>.
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.
Patch applied, thanks.