Re: [Patch] Netlink BUG() on AMD64

From: YOSHIFUJI Hideaki / 吉藤英明
Date: Wed Feb 11 2004 - 13:59:44 EST


In article <20040212.034537.11291491.yoshfuji@xxxxxxxxxxxxxx> (at Thu, 12 Feb 2004 03:45:37 +0900 (JST)), YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx> says:

> In article <20040211181113.GA2849@xxxxxxxxxx> (at Wed, 11 Feb 2004 19:11:14 +0100), Jan Kasprzak <kas@xxxxxxxxxxxxxxxxxxx> says:
>
> > I suggest the following patch, but all occurences of
> > nlmsg_failure: and rtattr_failure: labels should be checked for a similar
> > problem.
> >
> > --- linux-2.6.2/net/ipv4/fib_rules.c.orig 2004-02-11 18:55:58.000000000 +0100
> > +++ linux-2.6.2/net/ipv4/fib_rules.c 2004-02-11 19:03:08.319215408 +0100
> > @@ -438,7 +438,7 @@
> >
> > nlmsg_failure:
> > rtattr_failure:
> > - skb_put(skb, b - skb->tail);
> > + skb_trim(skb, b - skb->data);
> > return -1;
> > }
> >
> > Please apply or let me know what the proper fix should be.
>
> looks good to me.
> Other places including net/ipv6/{addrconf.c,route.c} seems okay.

Oops, I'd looked into ipv4 and ipv6 only.
I've grep'ed and found one in net/decnet.

===== net/decnet/dn_rules.c 1.6 vs edited =====
--- 1.6/net/decnet/dn_rules.c Fri May 9 01:46:11 2003
+++ edited/net/decnet/dn_rules.c Thu Feb 12 03:52:42 2004
@@ -381,7 +381,7 @@

nlmsg_failure:
rtattr_failure:
- skb_put(skb, b - skb->tail);
+ skb_trim(skb, b - skb->data);
return -1;
}


--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@xxxxxxxxxxxxxx>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/