* Re: Starfire (Adaptec) kernel 2.6.13+ panics on AMD64 NFS server
[not found] ` <d93f04c70509301310y4bde1189wbcaef40124af6766@mail.gmail.com>
@ 2005-09-30 22:39 ` Herbert Xu
2005-10-01 19:21 ` Hendrik Visage
0 siblings, 1 reply; 2+ messages in thread
From: Herbert Xu @ 2005-09-30 22:39 UTC (permalink / raw)
To: Hendrik Visage
Cc: Andrew Morton, linux-net, linux-kernel, ionut, Jeff Garzik,
netdev
[-- 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 */
^ permalink raw reply [flat|nested] 2+ messages in thread