提交 cd0f6421 编写于 作者: Y YueHaibing 提交者: Jakub Kicinski

tipc: check skb_linearize() return value in tipc_disc_rcv()

If skb_linearize() fails in tipc_disc_rcv(), we need to free the skb instead of
handle it.

Fixes: 25b0b9c4 ("tipc: handle collisions of 32-bit node address hash values")
Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
Acked-by: NJon Maloy <jmaloy@redhat.com>
Link: https://lore.kernel.org/r/20221119072832.7896-1-yuehaibing@huawei.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 5916380c
......@@ -211,7 +211,10 @@ void tipc_disc_rcv(struct net *net, struct sk_buff *skb,
u32 self;
int err;
skb_linearize(skb);
if (skb_linearize(skb)) {
kfree_skb(skb);
return;
}
hdr = buf_msg(skb);
if (caps & TIPC_NODE_ID128)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册