]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
orinoco: Move context allocation after processing the skb
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 13 Nov 2020 21:22:43 +0000 (22:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:25:56 +0000 (11:25 +0100)
commitb6d1a50c57c272f8ea04c36f8c251b4a9ec39e4e
treeb3370c087ec286ae4356b888eb9e8fd614dccf30
parent2bd2d5b8046be1b502ee0b295f7105a4a6bb4d7c
orinoco: Move context allocation after processing the skb

[ Upstream commit a31eb615646a63370aa1da1053c45439c7653d83 ]

ezusb_xmit() allocates a context which is leaked if
orinoco_process_xmit_skb() returns an error.

Move ezusb_alloc_ctx() after the invocation of
orinoco_process_xmit_skb() because the context is not needed so early.
ezusb_access_ltv() will cleanup the context in case of an error.

Fixes: bac6fafd4d6a0 ("orinoco: refactor xmit path")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201113212252.2243570-2-bigeasy@linutronix.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intersil/orinoco/orinoco_usb.c