]> git.hungrycats.org Git - linux/commitdiff
[NET]: Do not send negative 2nd arg to skb_put().
authorJan Kasprzak <kas@informatics.muni.cz>
Wed, 11 Feb 2004 11:44:47 +0000 (03:44 -0800)
committerHideaki Yoshifuji <yoshfuji@linux-ipv6.org>
Wed, 11 Feb 2004 11:44:47 +0000 (03:44 -0800)
With help from Yoshfuji Hideaki.

net/decnet/dn_rules.c
net/ipv4/fib_rules.c

index e170363641bfc51508662336d5752d0846bcada6..17cc9c356ba2a9a11009286c2a99b92ab8278b6f 100644 (file)
@@ -381,7 +381,7 @@ static int dn_fib_fill_rule(struct sk_buff *skb, struct dn_fib_rule *r, struct n
 
 nlmsg_failure:
 rtattr_failure:
-       skb_put(skb, b - skb->tail);
+       skb_trim(skb, b - skb->data);
        return -1;
 }
 
index c271e5965779b9c1e6c59c0b97749740071b233a..66e78bb4e2d4ea8d615561ab9e3c89f59722eaaa 100644 (file)
@@ -438,7 +438,7 @@ static __inline__ int inet_fill_rule(struct sk_buff *skb,
 
 nlmsg_failure:
 rtattr_failure:
-       skb_put(skb, b - skb->tail);
+       skb_trim(skb, b - skb->data);
        return -1;
 }