tipc: return value of skb_linearize should be handled
Subsystems (3)
PATCH 1/1 tipc: return value of skb_linearize should be handled
return value of skb_linearize should be handled
Signed-off-by Zhouyi Zhou <[email protected]>
Reviewed-by Cong Wang <[email protected]>
Reviewed-by Yuval Shaia <[email protected]>
Reviewed-by Eric Dumazet <[email protected]>
--- net/tipc/link.c | 3 ++- net/tipc/name_distr.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-)
net/tipc/link.c +2 -1
@@ -1446,7 +1446,8 @@ static int tipc_link_proto_rcv(struct tipc_link *l, struct sk_buff *skb,if (tipc_own_addr (l->net) >msg_prevnode (hdr)) l->net_plane =msg_net_plane (hdr); -skb_linearize (skb); +if (skb_linearize (skb)) + goto exit; hdr =buf_msg (skb); data =msg_data (hdr);
net/tipc/name_distr.c +4 -1
@@ -356,7 +356,10 @@ void tipc_named_rcv(struct net *net, struct sk_buff_head *inputq)spin_lock_bh (&tn->nametbl_lock);for (skb =skb_dequeue (inputq); skb; skb =skb_dequeue (inputq)) { -skb_linearize (skb); +if (skb_linearize (skb)) { +kfree_skb (skb); +continue ; + } msg =buf_msg (skb); mtype =msg_type (msg); item = (struct distr_item *)msg_data (msg);
Signature · 1 line
1.9.1