Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3065762pxj; Mon, 17 May 2021 16:54:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjvmo8b1VdqcRUblsKPtxGJwGem/lcls5Q4kAnDoYpCJAX1e6GlolDVq1CgzWDgcyLfOHc X-Received: by 2002:a05:6402:350d:: with SMTP id b13mr3266257edd.21.1621295662491; Mon, 17 May 2021 16:54:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621295662; cv=none; d=google.com; s=arc-20160816; b=NuIlqngyKRG2peqv2oUheTY7q+As/nEqtJa/QTTzl/uSxWD4HUHdVBeh+6TOZfS8nB oZSrCeNnfSgHSh2PNNjNluwFQ1sK7aljXpLKcwiEcUMgioQgYMXoQ5wUirp2O2m0zc1C KXNOWucUT4cSuvj30hxpYMJq38YUAnxPpRtRdSgfMcAITb2HCasxQwRwMcgkuL56qk+K WOzB9TtGxB60jI+ci3PlHsvImGdseOBd+BbXaRxvQJaTsIkmrJbFAnwZov2CFv5bV2TU FpdvuWNDI0EJoKEmq55LJSHcTj9Q2/rNQrSNjlkxJlgXJsqbT/e70UxgSCNdp08F7HMo oibw== 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=mmUK0G47OrAPO22LE0tX4oaXOC2cjbF88NDAxAKCUFo=; b=Yv5e9XxqgcR/hnos4foSNa1dt6dqGZ4vR8YCRYEI1xQzZLLY608bfvej9ookICRizP p1CENYmZ6kMDDdDPf79ofyF/R24VtFMibCqCBumTXTveU7hnmwC2OfT4SUQSSAqnEPyg rn4Gsmn3kGlJ2atciju64KhGOMkUkmpJwkT/0zmicZOuAth6mxD8EvXb9vsJPMb4+uOS FpPBXo9Ee0ssMvSckHMODMmuF6SVVIlWeoLeBpTW0qUHkSl82MUazng1JeaZ4pRAgGYG bDkTahi2rPJnDVLe1uR18R3Dj8laIYuVVu7b3sMDU4kL8MbB+QCvEgMO/5nJe+ikRMPr muJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EWYAJcPA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id du20si475989ejc.738.2021.05.17.16.53.59; Mon, 17 May 2021 16:54:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EWYAJcPA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S239432AbhEQOYF (ORCPT + 99 others); Mon, 17 May 2021 10:24:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:35964 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238961AbhEQOUe (ORCPT ); Mon, 17 May 2021 10:20:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A8B2D6143D; Mon, 17 May 2021 14:11:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260682; bh=IOw7ODimH/olPmfroSeCwqmGPxtQNUK1YKD8FNkT91U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EWYAJcPAldBeehOVJi1iqCxYzinvXkjhUQCJlQje4Q1U1jU0L4gl68xKvFtfAUEp4 /rN42QNOhMe4YrzcSvXUUKFnV455A+b9XAgisCM+6iJKPsuAFKBNMCZHqSUjHA6teE 25QbhP8M3HBf/i+OgLAh7StwYHSGFiitEhm/4QyQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yufeng Mo , Huazhong Tan , "David S. Miller" , Sasha Levin Subject: [PATCH 5.12 193/363] net: hns3: initialize the message content in hclge_get_link_mode() Date: Mon, 17 May 2021 16:00:59 +0200 Message-Id: <20210517140309.113158128@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yufeng Mo [ Upstream commit 568a54bdf70b143f3e0befa298e22ad469ffc732 ] The message sent to VF should be initialized, otherwise random value of some contents may cause improper processing by the target. So add a initialization to message in hclge_get_link_mode(). Fixes: 9194d18b0577 ("net: hns3: fix the problem that the supported port is empty") Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c index 51a36e74f088..c3bb16b1f060 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c @@ -535,7 +535,7 @@ static void hclge_get_link_mode(struct hclge_vport *vport, unsigned long advertising; unsigned long supported; unsigned long send_data; - u8 msg_data[10]; + u8 msg_data[10] = {}; u8 dest_vfid; advertising = hdev->hw.mac.advertising[0]; -- 2.30.2