[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080106010358.GA2991@gondor.apana.org.au>
Date: Sun, 6 Jan 2008 12:03:59 +1100
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Jan Engelhardt <jengelh@...putergmbh.de>
Cc: Al Viro <viro@...IV.linux.org.uk>, m.kozlowski@...land.pl,
davem@...emloft.net, sparclinux@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: sparc oops in ip_fast_csum
On Sun, Jan 06, 2008 at 01:57:13AM +0100, Jan Engelhardt wrote:
>
> >@@ -304,7 +305,8 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length,
> > goto error_fault;
> >
> > /* We don't modify invalid header */
> >- if (length >= sizeof(*iph) && iph->ihl * 4U <= length) {
> >+ iphlen = iph->ihl * 4;
> >+ if (iphlen >= sizeof(*iph) && iphlen <= length) {
>
> Humm, this could use ip_hdrlen(skb) :-)
That would not necessarily be an improvement since we'd have to reload
the values from skb.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists