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 87E4745A50; Sat, 28 Sep 2024 18:49:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 973EB406BA; Sat, 28 Sep 2024 18:48:46 +0200 (CEST) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mails.dpdk.org (Postfix) with ESMTP id F218840656 for ; Sat, 28 Sep 2024 18:48:36 +0200 (CEST) Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-2053616fa36so40455475ad.0 for ; Sat, 28 Sep 2024 09:48:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727542116; x=1728146916; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aBYpM1ABa9i52itRxAsY1yKqaNfS+h1U5AU5hu6gdcM=; b=Cl/xmvmuM8MgQUF/5FKMFRUeRMUZkVAG9/rOByyWO4bs8XW16mkYt37eYeIgXRvDAV 1ISMA2sz3gRMiBz9Mo4G57Gn2VM2xjitg1eqxiUKLUmxZM9T+LmheCG/HH0JFzWtAZ0+ MBHwqKv4Sy4gmuCS+dpIu8j99mbj3Uj23+beZQkjcbwnYt0N1SvEQSCXEUePIBqBEbX3 +YSTcnL/5RHOJLq/Tm21Vq/zZ1HlAgn30+iGq2WfnaDvP4ayDcTlRqoJu+RkNbsbLf3a cRU9Le+FzIo//xZQ2z9g3wEaN6TB5g6KHpqK7t5dXkRf45spfswEmyD3H+VttMoplXxv vUmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727542116; x=1728146916; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aBYpM1ABa9i52itRxAsY1yKqaNfS+h1U5AU5hu6gdcM=; b=kkoZk043uRnluM3dLabMfom3LUALj8e8ba7R7O3b6kg9AWM/LO9b3TrSK0ppuLhw0Q k7LWeQ0pg8cxHN/XLdIaZR+xcX+KHGa/Qt+JZdo68DJgmcFSPDJh9lYFao+5VCoF8eoq cCMHOhSKRct9fN+njAtpNIkFc0t35Jl0jXhQ1hQZfWOJUzgcXkQTm19NBBCpqLg4fCZF nrzNEIqASWG0B0pMwb38MsbkejSKerydCihgLbRKyN/7490wdKWDeEYzC3N7yP+mm57f cCsMR7ioEoYNkJf0MlFeQb7bUXEDayRy13nulFMKs+kKXIAoUiHVzppcO1rll6ozINpU Qe8g== X-Gm-Message-State: AOJu0Ywz8yfnxbGM2HK2fVIBzprbDBvjNgDVho0aihG75Hh7bceexgL0 cD3swBmmpNE/1s/f/9Js1H1y97NVVBKsxfdqBPckTQEGtLEZIgCfdHIwdznxWs1OV1tr0mXI9/5 A X-Google-Smtp-Source: AGHT+IECqzAnE5SF4oX+xIpsn+Ih/TevdrNmihGL3khtbvtjwOifI7DICZppgJw933TsV28dp2L9CA== X-Received: by 2002:a17:903:228b:b0:207:3fd0:13ec with SMTP id d9443c01a7336-20b367e9354mr120612035ad.17.1727542116079; Sat, 28 Sep 2024 09:48:36 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20b37e47c7dsm28854015ad.216.2024.09.28.09.48.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Sep 2024 09:48:35 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , chaoyong.he@corigine.com, =?UTF-8?q?Niklas=20S=C3=B6derlund?= Subject: [PATCH v2 12/16] net/nfp: fix duplicate call to rte_free Date: Sat, 28 Sep 2024 09:47:20 -0700 Message-ID: <20240928164814.861933-13-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240928164814.861933-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20240928164814.861933-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Calling rte_free twice on same object will corrupt the heap. Warning is: In function 'nfp_pre_tun_table_check_del', inlined from 'nfp_flow_destroy' at ../drivers/net/nfp/flower/nfp_flower_flow.c:5143:9: ../drivers/net/nfp/flower/nfp_flower_flow.c:3830:9: error: pointer 'entry' used after 'rte_free' [-Werror=use-after-free] 3830 | rte_free(entry); | ^~~~~~~~~~~~~~~ ../drivers/net/nfp/flower/nfp_flower_flow.c:3825:9: note: call to 'rte_free' here 3825 | rte_free(entry); | ^~~~~~~~~~~~~~~ Bugzilla ID: 1555 Fixes: d3c33bdf1f18 ("net/nfp: prepare for IPv4 UDP tunnel decap flow action") Cc: chaoyong.he@corigine.com Signed-off-by: Stephen Hemminger --- drivers/net/nfp/flower/nfp_flower_flow.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c index 0078455658..64a0062c8b 100644 --- a/drivers/net/nfp/flower/nfp_flower_flow.c +++ b/drivers/net/nfp/flower/nfp_flower_flow.c @@ -3822,7 +3822,6 @@ nfp_pre_tun_table_check_del(struct nfp_flower_representor *repr, goto free_entry; } - rte_free(entry); rte_free(find_entry); priv->pre_tun_cnt--; -- 2.45.2