From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-6.2 required=5.0 tests=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 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by gnuweeb.org (Postfix) with ESMTPS id D1CB980108 for ; Wed, 27 Jul 2022 10:20:48 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=JaGgQ2Zg; dkim-atps=neutral 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 ams.source.kernel.org (Postfix) with ESMTPS id 475D9B82012; Wed, 27 Jul 2022 10:20:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1269C433D6; Wed, 27 Jul 2022 10:20:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658917246; bh=zInUtRDkP0CInDHQOs4hPEp3ldGko/tXOIpnWeY7TuQ=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=JaGgQ2Zg1rB1DBHAmio7/LzXyQ5VbRV/63eZoEv2bBrCkHxhOiKb225WuOHJsaGuG 1wxx8zpuJ/NQrGYTCbRMl1nWDM2WcV5kKsrkf9CnLQZ3c2hjA30R2nVIA2wpihs9/l nfAfDmkfVW4rZdVVgg+vOd0tJeXyr5rIx6qfB85rs35fHNKVeb10qin856M1AjEsJ7 D5V7f79hBT7SFeLLVVOz8ex++C0H9n8RS1e/10CThBm2IXjmpTmSAUJXPgtVKSnT8X vqPFXtah9axurwYZJVxM5TFOFOOpy68/UylL2Sj+RseuD/AuvyKN2p81F8BWAnRcwt MzU8FfmSL+siw== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] wifi: wil6210: debugfs: fix uninitialized variable use in `wil_write_file_wmi()` From: Kalle Valo In-Reply-To: <20220724202452.61846-1-ammar.faizi@intel.com> References: <20220724202452.61846-1-ammar.faizi@intel.com> To: Ammar Faizi Cc: Ammar Faizi , Kalle Valo , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Dan Carpenter , Johannes Berg , Linux Wireless Mailing List , netdev Mailing List , Linux Kernel Mailing List , GNU/Weeb Mailing List , llvm@lists.linux.dev, kbuild-all@lists.01.org, kernel test robot User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <165891724082.18387.16489160205660897757.kvalo@kernel.org> Date: Wed, 27 Jul 2022 10:20:42 +0000 (UTC) List-Id: Ammar Faizi wrote: > Commit 7a4836560a61 changes simple_write_to_buffer() with memdup_user() > but it forgets to change the value to be returned that came from > simple_write_to_buffer() call. It results in the following warning: > > warning: variable 'rc' is uninitialized when used here [-Wuninitialized] > return rc; > ^~ > > Remove rc variable and just return the passed in length if the > memdup_user() succeeds. > > Cc: Dan Carpenter > Reported-by: kernel test robot > Fixes: 7a4836560a6198d245d5732e26f94898b12eb760 ("wifi: wil6210: debugfs: fix info leak in wil_write_file_wmi()") > Fixes: ff974e4083341383d3dd4079e52ed30f57f376f0 ("wil6210: debugfs interface to send raw WMI command") > Signed-off-by: Ammar Faizi > Reviewed-by: Dan Carpenter > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. d578e0af3a00 wifi: wil6210: debugfs: fix uninitialized variable use in `wil_write_file_wmi()` -- https://patchwork.kernel.org/project/linux-wireless/patch/20220724202452.61846-1-ammar.faizi@intel.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches