From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B672941DA2 for ; Tue, 28 Feb 2023 22:31:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD5EE41140; Tue, 28 Feb 2023 22:31:31 +0100 (CET) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 07EEB4021F; Tue, 28 Feb 2023 22:31:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677619889; x=1709155889; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=A+ygbGIlQFbJtO1ip0ZcwnSSJ5EgxcAJdFMT4jrTkL4=; b=ikPnbHqa62Is+ge/eB6D/kO3DCvqvl/7nrzsImg9hwKXik7W0ZMGK+yQ BFuvPra8DD2YqkPcFQV6HMtX5ysgiZextYGuk2w9FSR5sXieu+iLq09fj eBc8ylk6d/4l3+ntjWEpp2IwrRBBIU2Vj4+dJsjrAu824Wcu88eWWVz2Y 6W2j2JnCGtZ8peOPXVd9IoBynQqf23ITSnUF2kCmpm6/Lbs/qesh9zNbi aukf9K6WaYUWVh4yFYUtDIZqIjFXDUBQYkB24h1tGzat7FnP8RPEDf5U/ JUOBQj8Dc2gl8kBOi7rUh67xhmlNAqVxZYPLTt3q9DTxGWt9k21x5jN1b Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10635"; a="396822038" X-IronPort-AV: E=Sophos;i="5.98,223,1673942400"; d="scan'208";a="396822038" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2023 13:31:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10635"; a="743138737" X-IronPort-AV: E=Sophos;i="5.98,223,1673942400"; d="scan'208";a="743138737" Received: from txanpdk02.an.intel.com ([10.123.117.76]) by fmsmga004.fm.intel.com with ESMTP; 28 Feb 2023 13:31:27 -0800 From: Abdullah Sevincer To: dev@dpdk.org Cc: jerinj@marvell.com, pbhagavatula@marvell.com, Abdullah Sevincer , stable@dpdk.org Subject: [PATCH v1] eventdev: fix invalid memory free operation Date: Tue, 28 Feb 2023 15:31:23 -0600 Message-Id: <20230228213123.371897-1-abdullah.sevincer@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org This commit fixes invalid memory free operation caused by extending xstats ID width from 32 to 64 bits. Telemetry application crashed when freeing memory, hence, the telemetry app could not display xstats. Fixes: 1bdfe4d76e98 ("eventdev: increase xstats ID width to 64 bits") Cc: stable@dpdk.org Signed-off-by: Abdullah Sevincer --- lib/eventdev/rte_eventdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c index 71a29f3506..6ab4524332 100644 --- a/lib/eventdev/rte_eventdev.c +++ b/lib/eventdev/rte_eventdev.c @@ -1725,7 +1725,7 @@ eventdev_build_telemetry_data(int dev_id, if (xstat_names == NULL) return -1; - ids = malloc((sizeof(unsigned int)) * num_xstats); + ids = malloc((sizeof(uint64_t)) * num_xstats); if (ids == NULL) { free(xstat_names); return -1; -- 2.25.1