From: David S. Miller Date: Fri, 20 Jan 2006 12:31:34 +0000 (-0800) Subject: [PATCH] Make second arg to skb_reserved() signed. X-Git-Tag: v2.6.15.2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f0ae08d5897f3bd66612d568081392c8dd9eeb1;p=thirdparty%2Fkernel%2Fstable.git [PATCH] Make second arg to skb_reserved() signed. 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 Signed-off-by: Chris Wright Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 8c5d6001a923c..c461bc54b0c8f 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -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;