Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2008888imm; Thu, 24 May 2018 04:27:05 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoDvGTxFDTMGJxUBB80htnnmhbs+AJYghkoZUuZPjleFZ+QsQCGhsFDsDL2AMc1jXhQWDwb X-Received: by 2002:a62:965c:: with SMTP id c89-v6mr6867516pfe.37.1527161225584; Thu, 24 May 2018 04:27:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527161225; cv=none; d=google.com; s=arc-20160816; b=Y7/Pxh4JVS7wnENwMkVZ0MxPx2DMDHwDl3aszkQeYC9nTBbPQWVXjPA842xQHsyLQM 0V38ByUlw5ciUD19pjHabDL6Fc1NlW8rPMxz4Dv1r9XNeyIAgRt+ORyjS02RyragytLi CcU0ShJSfBKgqIvJLanc+sbWacUDlawjareGejFWZDJjonU48BnzuEYo6AoDoE0Lh36F J/fSATDUS6oWYD4xr1qp/U5YfGxJukhjTPeeKpYX5F9aUdunFL0Ifi7PLdQs3naF1n18 bBBu12QXD1AaUXhO80F9TvQVECdJ4E7Mnq03P+gQ9VBvg5m7KUy4FES03FSmZezGGeSW ruMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=UtxAl8Xz4n50vIluw+t3Ab66taaitd2u+9JupHTQBto=; b=E2MdXkMDlnLWHV6kPYqChmUz2iTn765Npp2IQP311ve43jgHhW6ATflZPZwW0cuz/G /F7iL9GEiuovotQGrEYjz1nkYPEBZ73js8SXVM95Zp5c6rS9zDXh6jmbRs9GpGY/5Y7j bAGSuRcekCUVBK/5xyhJwowHKbL4f3iIeCgJN/12w96bSqyVGW0mkdmY9i8aRwdPwSJy mp3nRwtIwo64wjYYI7n6bNc5RyV0wipyV8eSAJTSxXl72zyZX+lS/3ciUorKioRyQPW9 mtZ7RyjXoWGdPM6wOsTcrHhbq9nEGOC+f8OGS+w5iIV4pP6VjniMKCmyN4xiYTjtVsPR 21sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JZ+wTBUm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z19-v6si20553667plo.174.2018.05.24.04.26.51; Thu, 24 May 2018 04:27:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JZ+wTBUm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968829AbeEXLZF (ORCPT + 99 others); Thu, 24 May 2018 07:25:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:48142 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967767AbeEXJvt (ORCPT ); Thu, 24 May 2018 05:51:49 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8AD0A20847; Thu, 24 May 2018 09:51:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155509; bh=jGS0EASTyexbppSLy5aLnlUwS+ZHKrrnrai2ximkrH4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JZ+wTBUmU4L6l4rKIyXHYBy1wWcX+ADBr8vDYqR3bjC/LsMJOJSBKwzukcOAGdEWD NASmrsyaj7UCGHFjYZTRV2Zeje0s7fiCgNiSR/PfTKfRfnx2s9G4Lqw9fcaA4or4WW 0TBv0D78Cn0WSqj+aVX6jtDT7Mqln5bgG9/BXyMQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Haiyang Zhang , "David S. Miller" Subject: [PATCH 4.14 015/165] hv_netvsc: Add initialization of tx_table in netvsc_device_add() Date: Thu, 24 May 2018 11:37:01 +0200 Message-Id: <20180524093622.599121718@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093621.979359379@linuxfoundation.org> References: <20180524093621.979359379@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Haiyang Zhang [ Commit 6b0cbe315868d613123cf387052ccda5f09d49ea upstream. ] tx_table is part of the private data of kernel net_device. It is only zero-ed out when allocating net_device. We may recreate netvsc_device w/o recreating net_device, so the private netdev data, including tx_table, are not zeroed. It may contain channel numbers for the older netvsc_device. This patch adds initialization of tx_table each time we recreate netvsc_device. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/hyperv/netvsc.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c @@ -1252,6 +1252,9 @@ struct netvsc_device *netvsc_device_add( if (!net_device) return ERR_PTR(-ENOMEM); + for (i = 0; i < VRSS_SEND_TAB_SIZE; i++) + net_device_ctx->tx_table[i] = 0; + net_device->ring_size = ring_size; /* Because the device uses NAPI, all the interrupt batching and