[PATCH] Make second arg to skb_reserved() signed.
authorDavid S. Miller <davem@davemloft.net>
Fri, 20 Jan 2006 12:31:34 +0000 (04:31 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 31 Jan 2006 06:13:18 +0000 (22:13 -0800)
Some subsystems, such as PPP, can send negative values
here.  It just happened to work correctly on 32-bit with
an unsigned value, but on 64-bit this explodes.

Figured out by Paul Mackerras based upon several PPP crash
reports.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/linux/skbuff.h

index 8c5d6001a923c5042b74dc1a0fc2bf6e30251f9b..c461bc54b0c8f737dc7690971f06f9f9dab1e0a7 100644 (file)
@@ -927,7 +927,7 @@ static inline int skb_tailroom(const struct sk_buff *skb)
  *     Increase the headroom of an empty &sk_buff by reducing the tail
  *     room. This is only allowed for an empty buffer.
  */
-static inline void skb_reserve(struct sk_buff *skb, unsigned int len)
+static inline void skb_reserve(struct sk_buff *skb, int len)
 {
        skb->data += len;
        skb->tail += len;