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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D48ECC433F5 for ; Wed, 27 Oct 2021 07:38:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A90BC6008E for ; Wed, 27 Oct 2021 07:38:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240521AbhJ0Hku (ORCPT ); Wed, 27 Oct 2021 03:40:50 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:55375 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238693AbhJ0Hku (ORCPT ); Wed, 27 Oct 2021 03:40:50 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1635320305; h=Date: Message-ID: Cc: To: References: In-Reply-To: From: Subject: Content-Transfer-Encoding: MIME-Version: Content-Type: Sender; bh=4D+NpuyWjz/iDTtgYL+8AyWNLmTqw2y57iNF8n2sarw=; b=fdPJ3WaBNauF+AKvYycG+NcZsg99lu6pCSWOp8PwI+PHb/ilXKAOnxkxk2RV5m7emaR30w0N vd2rFdh1+CDl63m4w6EQFGmyKUSvnhH4OMKbPpuIPQClGjJ9X6gdgXpwiVuvWChohnILRvZt KBgFW4L5a8Is3l/I3LN59bYz3AA= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-east-1.postgun.com with SMTP id 617901e7308e0dd3301a1d69 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 27 Oct 2021 07:38:15 GMT Sender: kvalo=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 1C3B7C43460; Wed, 27 Oct 2021 07:38:15 +0000 (UTC) Received: from tykki.adurom.net (tynnyri.adurom.net [51.15.11.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id DD181C4338F; Wed, 27 Oct 2021 07:38:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org DD181C4338F Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=codeaurora.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] rtw89: Fix variable dereferenced before check 'sta' From: Kalle Valo In-Reply-To: <20211022061242.8383-1-pkshih@realtek.com> References: <20211022061242.8383-1-pkshih@realtek.com> To: Ping-Ke Shih Cc: , User-Agent: pwcli/0.1.0-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <163532029168.30745.3514543430425689139.kvalo@codeaurora.org> Date: Wed, 27 Oct 2021 07:38:15 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Ping-Ke Shih wrote: > The pointer rtwsta is dereferencing pointer sta before sta is being null > checked. Fix this by assigning sta->drv_priv to rtwsta only if sta is not > NULL, otherwise just NULL. > > Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver") > Reported-by: Colin Ian King > Signed-off-by: Ping-Ke Shih Patch applied to wireless-drivers-next.git, thanks. 5d44f0672319 rtw89: Fix variable dereferenced before check 'sta' -- https://patchwork.kernel.org/project/linux-wireless/patch/20211022061242.8383-1-pkshih@realtek.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches