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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5A500C04A68 for ; Wed, 27 Jul 2022 23:16:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id C9B5A60B31; Wed, 27 Jul 2022 23:16:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org C9B5A60B31 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1658963783; bh=8FklffUlJ3f9Mr77mfEIz759xJENIKDo1EwXi722Uco=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=BpJXE/Cf2siA0fADbi32YXfc223IjKdkSgs0zoPxhMKIpZhGBAaAasVMhOAMLTAHl Rg7ijM/pGLspNTVThmJNjvYbBZj1yMMlAqmgktf5kN+lTp2k251Nx+5Z4NE6EBk0Xr p6rMuwY08MVNdh1kxuWyZ1n+bQiVUzlD1Ic56uvewrZbKV6KJL0OWaNcvRPdPLVskW G59esxzM3Eq2uZaYEZjiErbHhjF/R/3kvcAct4Ru2ndrprZhgFeyo2jHcycR/dhlCF BP7AT3b6w3p3sWv2M4c0vw6MAqlcjHry6oBf+GxgZm7hF/M1pmvyxbyyPiT4bqBQm+ oJS/VFFo4x6nw== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DED3WG9YJ1cv; Wed, 27 Jul 2022 23:16:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id DA8C060EB2; Wed, 27 Jul 2022 23:16:22 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org DA8C060EB2 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 50CE71BF42D for ; Wed, 27 Jul 2022 23:16:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 282EC416F5 for ; Wed, 27 Jul 2022 23:16:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 282EC416F5 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q2IJWXeA8WOP for ; Wed, 27 Jul 2022 23:16:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 2427D415BF Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by smtp4.osuosl.org (Postfix) with ESMTPS id 2427D415BF for ; Wed, 27 Jul 2022 23:16:19 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6400,9594,10421"; a="288382449" X-IronPort-AV: E=Sophos;i="5.93,196,1654585200"; d="scan'208";a="288382449" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 16:16:10 -0700 X-IronPort-AV: E=Sophos;i="5.93,196,1654585200"; d="scan'208";a="846448001" Received: from jekeller-desk.amr.corp.intel.com (HELO jekeller-desk.jekeller.internal) ([10.166.241.7]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 16:16:09 -0700 From: Jacob Keller To: Intel Wired LAN Date: Wed, 27 Jul 2022 16:15:57 -0700 Message-Id: <20220727231602.1625980-2-jacob.e.keller@intel.com> X-Mailer: git-send-email 2.37.1.208.ge72d93e88cb2 In-Reply-To: <20220727231602.1625980-1-jacob.e.keller@intel.com> References: <20220727231602.1625980-1-jacob.e.keller@intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658963780; x=1690499780; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ey6pxxRz8uv6NX60hlF+g/AHbOzLmI5YGVcvPkgAUOo=; b=HIAxP2P7ybtwU7Ejnq0k/Xn9WMHXcvntXSowWVacmREKlpKtnJq8O4jt s7hQVuT+Tsxx3VKe/tSL0KU+z2+aWO5eFfWylCxCAWoSMhSO3qijK/DsJ URtjWM2gJtEYX4OWp+4jeYFNBjgULY1thmyFP8DdKBSb64E+zDaERlFqs beEE3v3G05iP1STPzRhMwI38N/9TgQ/Z+mPzfh3nWyNWHsci09HRP/3RK aypZ0eJdX+9xoqT4Tubw8uyHaSz1Ntgxa6x5BsGPdfEbJLOHuflgiBZom y/6HG4LKxKminwQnj9fWoHb9If1e7R4A2LnPp5sgRByjfh4g9HVz6qqE7 g==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=HIAxP2P7 Subject: [Intel-wired-lan] [net-next v2 1/6] ice: set tx_tstamps when creating new Tx rings via ethtool X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" When the user changes the number of queues via ethtool, the driver allocates new rings. This allocation did not initialize tx_tstamps. This results in the tx_tstamps field being zero (due to kcalloc allocation), and would result in a NULL pointer dereference when attempting a transmit timestamp on the new ring. Signed-off-by: Jacob Keller --- drivers/net/ethernet/intel/ice/ice_ethtool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c index 238706d94ab2..bea87c5acd26 100644 --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c @@ -2823,6 +2823,7 @@ ice_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring, tx_rings[i].count = new_tx_cnt; tx_rings[i].desc = NULL; tx_rings[i].tx_buf = NULL; + tx_rings[i].tx_tstamps = &pf->ptp.port.tx; err = ice_setup_tx_ring(&tx_rings[i]); if (err) { while (i--) -- 2.37.1.208.ge72d93e88cb2 _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan