From patchwork Wed Oct 19 08:26:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5319 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp285271wrs; Wed, 19 Oct 2022 05:07:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4slpLnVm37c9+Y64vRR2Q+hEMxx3HSyqEAdZ3TBrRxBUHA4rgTeP6v5VR6I0sHbb0URnwI X-Received: by 2002:a17:90a:590a:b0:20a:e93e:2022 with SMTP id k10-20020a17090a590a00b0020ae93e2022mr9215663pji.141.1666181250399; Wed, 19 Oct 2022 05:07:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666181250; cv=none; d=google.com; s=arc-20160816; b=U9pqBfsxu566wPYZ+DRGssvZSitgKZD6i78FHcDn3vMp5cp2TfqirFvxMHht32wdXT R65o2w/sXYAn2Q9iZB2TPq+9yAILgb3TBvI77T23s4eb+EZxV0/EDMcscPcISHESQQ3L OmfhxaL463no65G+EvWn3Z/OOJUWEkLxh5BHPr2kU9K1T+xHhw14VhNZJAyIscxLl5y/ VYhiakrdeR0P422MfeKhq2V0SdFOcoCgjoQrT9sJ0mXIp+Mu7kC4N1JYGnWVZKkshEtK X+OFslTXT9SwscFXmOXY/4m7NAoHLZ9iPw+DGMSWp6jk3l/34b/xOu7Ox8JcostOYEuo Hf2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=B56lol8SL30SE8KEiPRKxYcaJXhxaU7EC+drJR+BzQY=; b=nJxGrIxhLqvx3dzhSrMfSTpa6mwo9BqtVPpllXSe358MlDcnNEfrlzsXihhOpXXzqr iKuZqH0hTa+wwot6QrO4QLs7xpsC3BRnJ1DSXeKjp5BhsDoyMJztKAp/BELt+xkuZkpu XcigfGwXm3i9RVHlo3tzNMZuC+aOdP1+Z9boxjh1tHWBvy4D7O7uK84fB2uSY7eTVqrG O623KkAzbhkBlBn5ItbdRhn/sFLL5kM65WJimdBD0uvdRVm8BF0S6WRW213MspB+8Y+C +RW8e9xahb6uGzugmToCCblsf5IivCd/PtdSrj8hMXMSyjMd8FFwKbqSVQAA/AwhpgI9 bWwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=f1ugUAqn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q18-20020a631f52000000b0043447486c84si17927034pgm.875.2022.10.19.05.07.14; Wed, 19 Oct 2022 05:07:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=f1ugUAqn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232524AbiJSMDq (ORCPT + 99 others); Wed, 19 Oct 2022 08:03:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231713AbiJSMDO (ORCPT ); Wed, 19 Oct 2022 08:03:14 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFA2B4C627; Wed, 19 Oct 2022 04:39:45 -0700 (PDT) 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 37FE1B8239B; Wed, 19 Oct 2022 08:51:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA378C433D6; Wed, 19 Oct 2022 08:51:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169475; bh=HEgbHPH4lSpqw0IoD5a5jolqD6Cro97cGscbSfURixw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f1ugUAqnjPZykZh2zVV+TFVO09corr+XSB4Z0FxV1IRK8HBkuvJ64cWbqPGBKmMQI l7yY7WAyewahUJnI+iNAtNoQYGAsPpaB8OCNu9HTtdbGkH8wBGpPtChIgbkHQDSbHT s/IvAtaYZ6Lcj7QU5IDp3n5LxOO+4ifAYvRJtaqE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lorenzo Bianconi , Felix Fietkau , Sasha Levin Subject: [PATCH 6.0 290/862] wifi: mt76: fix uninitialized pointer in mt7921_mac_fill_rx Date: Wed, 19 Oct 2022 10:26:17 +0200 Message-Id: <20221019083302.829350594@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747117670670921875?= X-GMAIL-MSGID: =?utf-8?q?1747117670670921875?= From: Lorenzo Bianconi [ Upstream commit 9be57ad73984545d594ed359dac19457bcb9fc27 ] Initialize msta pointer to NULL in mt7921_mac_fill_rx() in order to not dereference a uninitialized pointer. Fixes: 0880d40871d1d ("mt76: connac: move mt76_connac2_reverse_frag0_hdr_trans in mt76-connac module") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c index 6bd9fc9228a2..e8a7a5831782 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c @@ -235,7 +235,7 @@ mt7921_mac_fill_rx(struct mt7921_dev *dev, struct sk_buff *skb) u32 rxd2 = le32_to_cpu(rxd[2]); u32 rxd3 = le32_to_cpu(rxd[3]); u32 rxd4 = le32_to_cpu(rxd[4]); - struct mt7921_sta *msta; + struct mt7921_sta *msta = NULL; u16 seq_ctrl = 0; __le16 fc = 0; u8 mode = 0;