[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0801060156410.14194@fbirervta.pbzchgretzou.qr>
Date: Sun, 6 Jan 2008 01:57:13 +0100 (CET)
From: Jan Engelhardt <jengelh@...putergmbh.de>
To: Herbert Xu <herbert@...dor.apana.org.au>
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 Jan 6 2008 11:22, Herbert Xu wrote:
>@@ -271,6 +271,7 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length,
> int hh_len;
> struct iphdr *iph;
> struct sk_buff *skb;
>+ unsigned int iphlen;
> int err;
>
> if (length > rt->u.dst.dev->mtu) {
>@@ -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) :-)
--
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