Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122153
b: refs/heads/master
c: 9f782db
h: refs/heads/master
i:
  122151: e3f1718
v: v3
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Nov 25, 2008
1 parent b1b1760 commit 8e86db5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f6486d40b33d1ac2c44c7c55db7edf022d9f4329
refs/heads/master: 9f782db3f5ceee9aa8de6f853969fbec1b8c6e65
7 changes: 6 additions & 1 deletion trunk/net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -2018,7 +2018,10 @@ void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len)
skb_split_no_header(skb, skb1, len, pos);
}

/* Shifting from/to a cloned skb is a no-go. */
/* Shifting from/to a cloned skb is a no-go.
*
* Caller cannot keep skb_shinfo related pointers past calling here!
*/
static int skb_prepare_for_shift(struct sk_buff *skb)
{
return skb_cloned(skb) && pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
Expand Down Expand Up @@ -2070,6 +2073,8 @@ int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen)
skb_prepare_for_shift(tgt))
return 0;

/* All previous frag pointers might be stale! */
fragfrom = &skb_shinfo(skb)->frags[from];
fragto = &skb_shinfo(tgt)->frags[merge];

fragto->size += shiftlen;
Expand Down

0 comments on commit 8e86db5

Please sign in to comment.