Skip to content
Commit f4e6a7f1 authored by Linyu Yuan's avatar Linyu Yuan Committed by Sasha Levin
Browse files

net: cdc_eem: fix tx fixup skb leak

[ Upstream commit c3b26fdf ]

when usbnet transmit a skb, eem fixup it in eem_tx_fixup(),
if skb_copy_expand() failed, it return NULL,
usbnet_start_xmit() will have no chance to free original skb.

fix it by free orginal skb in eem_tx_fixup() first,
then check skb clone status, if failed, return NULL to usbnet.

Fixes: 9f722c09

 ("usbnet: CDC EEM support (v5)")
Signed-off-by: default avatarLinyu Yuan <linyyuan@codeaurora.org>
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c16c4716
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment