usb: gadget: eem: fix wrong eem header operation
authorLinyu Yuan <linyyuan@codeaurora.com>
Tue, 8 Jun 2021 23:35:47 +0000 (07:35 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jun 2021 08:57:52 +0000 (10:57 +0200)
commit305f670846a31a261462577dd0b967c4fa796871
treef00a841d985a8152d6a8c69db4605ff5ee9975b2
parent184fa76b87ca36c7e98f152df709bf6f492d8e29
usb: gadget: eem: fix wrong eem header operation

when skb_clone() or skb_copy_expand() fail,
it should pull skb with lengh indicated by header,
or not it will read network data and check it as header.

Cc: <stable@vger.kernel.org>
Signed-off-by: Linyu Yuan <linyyuan@codeaurora.com>
Link: https://lore.kernel.org/r/20210608233547.3767-1-linyyuan@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_eem.c