Commit 4f0ae08d authored by David S. Miller's avatar David S. Miller Committed by Greg Kroah-Hartman

[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: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d93f4eb4
...@@ -927,7 +927,7 @@ static inline int skb_tailroom(const struct sk_buff *skb) ...@@ -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 * Increase the headroom of an empty &sk_buff by reducing the tail
* room. This is only allowed for an empty buffer. * 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->data += len;
skb->tail += len; skb->tail += len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment