From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09015C43217 for ; Mon, 28 Nov 2022 13:57:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232270AbiK1N5V (ORCPT ); Mon, 28 Nov 2022 08:57:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232258AbiK1N4w (ORCPT ); Mon, 28 Nov 2022 08:56:52 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00DA2209B7; Mon, 28 Nov 2022 05:56:42 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 90B2561194; Mon, 28 Nov 2022 13:56:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05DC4C433D6; Mon, 28 Nov 2022 13:56:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669643802; bh=Vn72y+Uf4zhMuyCFO7GqK4vlRa1VsO5swAZK1L334vs=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=qdWaCVGG3fmU4aNMlK1WJAZH2c/XCLgy9esZJPEzoj1fqMIAozIEs9lsa+5r4tzWV psEAlJXhsQXYKpn5wwouOJu1ubitl0ZdDsf7rXhz7ZIEFRcJo72H1Us2bXA2DWcIW3 unuvavFZJyRL+kseMiBdMNAPxfjEHzur9VsIDkKofScY/qBSMrhbmzl4KiMbHcCi3Y l+iYkMVyQSh0Oq/T3KnCMocOZAtZUM9nWuNKvZpniNuYxMuOfPFG0jeoJoYr+4Vsk+ UvupilbC7x2r6DbfEEShwhqkOuLoD7czNYbQxGhE85doD9HXZ3DeIeTNPSG2+lOCYA hvX1d1TwFJKjQ== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH net] wifi: plfxlc: fix potential memory leak in __lf_x_usb_enable_rx() From: Kalle Valo In-Reply-To: <20221119051900.1192401-1-william.xuanziyang@huawei.com> References: <20221119051900.1192401-1-william.xuanziyang@huawei.com> To: Ziyang Xuan Cc: , , , , , , , User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <166964379732.4701.17323833019999253439.kvalo@kernel.org> Date: Mon, 28 Nov 2022 13:56:39 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ziyang Xuan wrote: > urbs does not be freed in exception paths in __lf_x_usb_enable_rx(). > That will trigger memory leak. To fix it, add kfree() for urbs within > "error" label. Compile tested only. > > Fixes: 68d57a07bfe5 ("wireless: add plfxlc driver for pureLiFi X, XL, XC devices") > Signed-off-by: Ziyang Xuan Patch applied to wireless-next.git, thanks. 895b3b06efc2 wifi: plfxlc: fix potential memory leak in __lf_x_usb_enable_rx() -- https://patchwork.kernel.org/project/linux-wireless/patch/20221119051900.1192401-1-william.xuanziyang@huawei.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches