Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp465500pxj; Tue, 18 May 2021 07:20:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlrFnVgoxJ5co5/C1FnATPUTMqVIsKfjxiCGTd4jvZ1OCupmevL9+2C23dG5zlqmaZZ4U5 X-Received: by 2002:a05:6402:c7:: with SMTP id i7mr7537980edu.194.1621347655394; Tue, 18 May 2021 07:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621347655; cv=none; d=google.com; s=arc-20160816; b=avZNkjQLYYguSoV/LFrqdHzpS51WkoVv+M/FVAQBdx81FadsUMJ/McNPcJD9QX/ttZ jqQGTOroNmw2K9rqUUYfRDvEoiaCTBUUnkom5pQK1U6xaDvZ6tM4yp29r9EEbPAkD06g rrbgd39CZAzogJNBfHdw7b5Hm+/ck565mZaCi5MJQKVR9kTzpBV7RLKJqMwq0LE2kqBu vG7oqSse/809WA9+nK/9mSLQO2a1pcAju9hHLTSIoT5WVBJt7iIBLa7iBBbTW097Gl5g PfRdj+ilfGu7Oia6TTwgd7uPcFCSVXonXZ4ViqqqwjdLqvVIekrSg3VuaNxE7g0ORHen rhug== 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=SI6C03LrhiGyC2JRiGSPkHM0WLy0T0NZAFdaNbPu+Ds=; b=EFdpNV4toU3TH3MI6Gsn7YrpBS8hjScE/9c4nyiHCtMWuW+JYr9oopfJ5hYBZoNeb0 rNPMY3UuAhCOuQ1IIw5Djolvlmarv7XJ350NslaUUlogZwHlJshzTh19Xs5JSN2ho8EE 2IS9n5sw777/BmUblgcrBkyFV7c3Bwze1dgiKcbuav6tAxnzZBVTYZRdaYQpKXwatL5Z j9C4e7L2KjjX3l13YPGfZIiG6Ezkhn/2Euyk0uuL4Xb8vJbdwvPLzSteAHYWz/Kn/C0r Qx1XYjktqnU+gbsbiFbJ6nDQFy/cBfPRdqcKlPYWgIn0Wr3ZLj3yDRSSzUPhGdTvUW+D WfSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=p2fAK4L+; 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 v20si17487194edc.437.2021.05.18.07.20.32; Tue, 18 May 2021 07:20:55 -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=p2fAK4L+; 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 S1344592AbhEQPpD (ORCPT + 99 others); Mon, 17 May 2021 11:45:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:52290 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245410AbhEQP3V (ORCPT ); Mon, 17 May 2021 11:29:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7463961CB9; Mon, 17 May 2021 14:37:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621262251; bh=ox3u0FULZW0wD7jQkUcR29pizd25a1i7y6ZCeDn1omk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p2fAK4L+MxYoRbVxFwqxP1EaNGEZuPYdWFwSuCekwQdKtuclF6uIE3dXGljU0SCOj mxhAudaaRS5B6vNE00eZafkkiatx0Q4yQjaPCb011yjN/i+E2ZSNi+7aJLYq72SJDS +IVSiu0mnA8qDwyMSohOQMDRXN5eixKGOxqnQ+zE= 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.10 146/289] net: hns3: initialize the message content in hclge_get_link_mode() Date: Mon, 17 May 2021 16:01:11 +0200 Message-Id: <20210517140310.065152529@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@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 9c8004fc9dc4..e0254672831f 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c @@ -519,7 +519,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