mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-01 08:20:44 -05:00
tipc: check skb_linearize() return value in tipc_disc_rcv()
[ Upstream commit cd0f6421162201e4b22ce757a1966729323185eb ]
If skb_linearize() fails in tipc_disc_rcv(), we need to free the skb instead of
handle it.
Fixes: 25b0b9c4e8 ("tipc: handle collisions of 32-bit node address hash values")
Signed-off-by: YueHaibing <[email protected]>
Acked-by: Jon Maloy <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
59f9aad22f
commit
23ba1997eb
1 changed files with 4 additions and 1 deletions
|
|
@ -208,7 +208,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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue