From: Patrick McHardy <kaber@trash.net>
To: eshi@anchiva.com.cn
Cc: Andrew Morton <akpm@osdl.org>,
netdev@vger.kernel.org,
"bugme-daemon@kernel-bugs.osdl.org"
<bugme-daemon@bugzilla.kernel.org>
Subject: Re: Fw: [Bugme-new] [Bug 7074] New: Kernel Panic on kernel 2.6.16.1
Date: Wed, 30 Aug 2006 13:24:34 +0200 [thread overview]
Message-ID: <44F57572.5070703@trash.net> (raw)
In-Reply-To: <20060829203019.c642cb7b.akpm@osdl.org>
[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]
Andrew Morton wrote:
> Obvious question: does it happen with 2.6.17.x or 2.6.18-rc5?
>
>
> Begin forwarded message:
>
> Date: Tue, 29 Aug 2006 19:49:11 -0700
> From: bugme-daemon@bugzilla.kernel.org
> To: bugme-new@lists.osdl.org
> Subject: [Bugme-new] [Bug 7074] New: Kernel Panic on kernel 2.6.16.1
>
>
> http://bugzilla.kernel.org/show_bug.cgi?id=7074
>
> Summary: Kernel Panic on kernel 2.6.16.1
> Kernel Version: 2.6.16.1
> Status: NEW
> Severity: high
> Owner: laforge@gnumonks.org
> Submitter: eshi@anchiva.com.cn
>
>
> Most recent kernel where this bug did not occur:
> Distribution:
> Hardware Environment: P4 3.4G 1G Mem
> Software Environment: FC3 Kernel 2.6.16.1
> Problem Description:
>
> kernel BUG at net/ipv4/netfilter/ip_conntrack_proto_tcp.c:911!
This can only happen if something corrupts the packet, probably
within the bridge netfilter code. This patch from Stephen (rediffed
against 2.6.16) fixes such a corruption, please try if it helps.
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1353 bytes --]
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h
index de4d397..56ef3cb 100644
--- a/include/linux/netfilter_bridge.h
+++ b/include/linux/netfilter_bridge.h
@@ -66,15 +66,25 @@ #endif
/* Only used in br_forward.c */
static inline
-void nf_bridge_maybe_copy_header(struct sk_buff *skb)
+int nf_bridge_maybe_copy_header(struct sk_buff *skb)
{
+ int err;
+
if (skb->nf_bridge) {
if (skb->protocol == __constant_htons(ETH_P_8021Q)) {
+ err = skb_cow(skb, 18);
+ if (err)
+ return err;
memcpy(skb->data - 18, skb->nf_bridge->data, 18);
skb_push(skb, 4);
- } else
+ } else {
+ err = skb_cow(skb, 16);
+ if (err)
+ return err;
memcpy(skb->data - 16, skb->nf_bridge->data, 16);
+ }
}
+ return 0;
}
static inline
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c
index 2d24fb4..dac7f06 100644
--- a/net/bridge/br_forward.c
+++ b/net/bridge/br_forward.c
@@ -37,11 +37,15 @@ int br_dev_queue_push_xmit(struct sk_buf
else {
#ifdef CONFIG_BRIDGE_NETFILTER
/* ip_refrag calls ip_fragment, doesn't copy the MAC header. */
- nf_bridge_maybe_copy_header(skb);
+ if (nf_bridge_maybe_copy_header(skb))
+ kfree_skb(skb);
+ else
#endif
- skb_push(skb, ETH_HLEN);
+ {
+ skb_push(skb, ETH_HLEN);
- dev_queue_xmit(skb);
+ dev_queue_xmit(skb);
+ }
}
return 0;
prev parent reply other threads:[~2006-08-30 11:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-30 3:30 Fw: [Bugme-new] [Bug 7074] New: Kernel Panic on kernel 2.6.16.1 Andrew Morton
2006-08-30 11:24 ` Patrick McHardy [this message]
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=44F57572.5070703@trash.net \
--to=kaber@trash.net \
--cc=akpm@osdl.org \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=eshi@anchiva.com.cn \
--cc=netdev@vger.kernel.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.