Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90737
b: refs/heads/master
c: fe13dda
h: refs/heads/master
i:
  90735: 81fe3c5
v: v3
  • Loading branch information
Allan Stephens authored and David S. Miller committed Apr 16, 2008
1 parent cd512f9 commit 98bc085
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bdc82bee43d11c093ff0378acef2a9550891cbb9
refs/heads/master: fe13dda2d24eca2ee8a6bb8a0af88ab84d589fd6
12 changes: 12 additions & 0 deletions trunk/net/tipc/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,4 +337,16 @@ static inline void buf_discard(struct sk_buff *skb)
kfree_skb(skb);
}

/**
* buf_linearize - convert a TIPC message buffer into a single contiguous piece
* @skb: message buffer
*
* Returns 0 on success.
*/

static inline int buf_linearize(struct sk_buff *skb)
{
return skb_linearize(skb);
}

#endif
6 changes: 6 additions & 0 deletions trunk/net/tipc/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -1811,6 +1811,12 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr)
#endif
msg_dbg(msg,"<REC<");

/* Ensure message data is a single contiguous unit */

if (unlikely(buf_linearize(buf))) {
goto cont;
}

if (unlikely(msg_non_seq(msg))) {
link_recv_non_seq(buf);
continue;
Expand Down

0 comments on commit 98bc085

Please sign in to comment.