Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp14900847rwb; Mon, 28 Nov 2022 06:09:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf4N7GGxnwOICehgdHTtyo7CzZtXLb9XTgMbYHeZdgoiuZQiCLD3MUGtkCcFVbcFg6uXDiId X-Received: by 2002:ac2:43bb:0:b0:494:6b75:2c1b with SMTP id t27-20020ac243bb000000b004946b752c1bmr19727430lfl.478.1669644558191; Mon, 28 Nov 2022 06:09:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669644558; cv=none; d=google.com; s=arc-20160816; b=NdSf6wq5g2hR+i3AuKTJZnh7nA2g1DifscEoy1oqcU9ezGmccScm5SEhEDJIOYxBOU 8wNtlaKTe5VXq+G7/JFipVzWYX+NgNBK773zobDIjkTX61ml7fGVDOu+P89gru+JmKp3 SZDqGrxAjVl3Ah+G8KANWaSpkcQhL+kDgQJiuGwvOOAVANGxxlUpq/zPIOZke8bW2KdG sWi2vl6al+KW61nD/00vy9Mij8Zq5B/JURAzsMm8ijCVxhTAaj3rjT0FiJQyz/QAS7YE 0lBi6Vwp6iD42wy58d6gWRmB5Lotmm+a/A3jYo9XQZ/kyq/0yekXYnToYqPWibh3lrKG xHBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=Z3mCOn3Jj3c1szsATxa3ez8kah/Y/h2X/7e01z5lTqQ=; b=Ytv8nOxPNe2XSno1QVek7nViaGVSUng0sgH7Phjf5wAHfkx8Zf7w+ZY7FBSLBHO70A amEeSJVKXmLUrFUCpddJkaOSB+ZuCneexm+8hYSv6PJnvDTfKvw1nfBjlLSwen2hwmwM PnggvC1G0OFPZLyo58FgQhxNZzUTfc15eOBElfIr1a9NCJTtP27X9wcJXByzc8s+4b/T BD1oIiyZV2ZNPzcQdTPx/XHxWWebZsWwxgOzALGW9Kht2cmMZiWUlZYcKwNZN068juhP eo+98WZ0VtIVpEGnq9qUVnaSOrIz2zndhukuXR5OHEsnzz5JF2L+g7gcF4SeAldo+xDM K2kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qdWaCVGG; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a056402520400b00443e3fe60a0si10228997edd.622.2022.11.28.06.08.56; Mon, 28 Nov 2022 06:09:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qdWaCVGG; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232207AbiK1N5O (ORCPT + 67 others); Mon, 28 Nov 2022 08:57:14 -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) X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@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