From: Herbert Xu <herbert@gondor.apana.org.au>
To: Hendrik Visage <hvjunk@gmail.com>
Cc: Andrew Morton <akpm@osdl.org>,
linux-net@vger.kernel.org, linux-kernel@vger.kernel.org,
ionut@badula.org, Jeff Garzik <jgarzik@pobox.com>,
netdev@vger.kernel.org
Subject: Re: Starfire (Adaptec) kernel 2.6.13+ panics on AMD64 NFS server
Date: Sat, 1 Oct 2005 08:39:15 +1000 [thread overview]
Message-ID: <20050930223915.GA17562@gondor.apana.org.au> (raw)
In-Reply-To: <d93f04c70509301310y4bde1189wbcaef40124af6766@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 843 bytes --]
On Fri, Sep 30, 2005 at 08:10:59PM +0000, Hendrik Visage wrote:
>
> Anycase, here is a non-PREEMPT traceback. What makes this one
> interesting, is that
> in the preempt case, I had to push the NFS output to get the panic, but the
> non-preempt case attached, sorta just happened, ie. when the clients
> just checked on the server's status :(
You must never call skb_checksum_help unless the packet is meant to
be checksummed by the hardware. So starfire is the guilty party here.
This patch makes it do the check and also check for errors from
skb_checksum_help.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
[-- Attachment #2: p --]
[-- Type: text/plain, Size: 654 bytes --]
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c
--- a/drivers/net/starfire.c
+++ b/drivers/net/starfire.c
@@ -1333,7 +1333,7 @@ static int start_tx(struct sk_buff *skb,
}
#if defined(ZEROCOPY) && defined(HAS_BROKEN_FIRMWARE)
- {
+ if (skb->ip_summed == CHECKSUM_HW) {
int has_bad_length = 0;
if (skb_first_frag_len(skb) == 1)
@@ -1346,8 +1346,10 @@ static int start_tx(struct sk_buff *skb,
}
}
- if (has_bad_length)
- skb_checksum_help(skb, 0);
+ if (has_bad_length && unlikely(skb_checksum_help(skb, 0))) {
+ dev_kfree_skb(skb);
+ return NETDEV_TX_OK;
+ }
}
#endif /* ZEROCOPY && HAS_BROKEN_FIRMWARE */
next parent reply other threads:[~2005-09-30 22:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <d93f04c70509292036x269df799y7b51c5be9c3356d6@mail.gmail.com>
[not found] ` <20050929211649.69eaddee.akpm@osdl.org>
[not found] ` <d93f04c70509300901s3836b8afw4792d16c589b4fc4@mail.gmail.com>
[not found] ` <20050930104046.4685e975.akpm@osdl.org>
[not found] ` <d93f04c70509301310y4bde1189wbcaef40124af6766@mail.gmail.com>
2005-09-30 22:39 ` Herbert Xu [this message]
2005-10-01 19:21 ` Starfire (Adaptec) kernel 2.6.13+ panics on AMD64 NFS server Hendrik Visage
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=20050930223915.GA17562@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=akpm@osdl.org \
--cc=hvjunk@gmail.com \
--cc=ionut@badula.org \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox