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 2B56345A8E; Wed, 2 Oct 2024 17:46:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DDBDA40A67; Wed, 2 Oct 2024 17:44:55 +0200 (CEST) Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by mails.dpdk.org (Postfix) with ESMTP id 86D204065F for ; Wed, 2 Oct 2024 17:44:49 +0200 (CEST) Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-7d666fb3fb9so9212a12.0 for ; Wed, 02 Oct 2024 08:44:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727883889; x=1728488689; 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=OhTuT7EpwXWRjNrQvMolEMQxQK/GDDFfjzS0kEWEmWMlbVw5xyxtsoEZxT9RkbH6y/ RRJmhGMl/imoPOV4lFAybchVaUIxnv16RQ1AHOCUBOWEJZVT/rHRiKJ8NheqyRO/iNJ7 DUaQehGUFuNcCkRlLjxVQIxK6ZSc3TQkCWrH9Ir/+QJBeUw7zwXpytwKPgaUs7hxNHPx KNXoWVgISFlO+ouDavvaELnIkAF1XuJLZujvEpwopAApJfAB2LPLap5w3nSAbTmhz79y AkCQh0rorhDaQzUcT4ng7fiyP6/Hd/r6+mqTbjYGJgCxEYWJfBmxswQAUuqSiCVJcLYc x3gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727883889; x=1728488689; 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=nSXUR28ore5Lm0ygD9LLGs6u9d5QWIUhXWNxfjSpT5jZSnESESyp53UMKhbdfOKbNH jeiZAf4+CpliZNEyDfPTonXhsswEsQzc8HI0bWcIQQljjIq0lhesMzRdE2xaYwKvUu3t 6Xx5hzoK+nCyECBP2IFZkLL9B3um1CT5LXVKPjwRvTh4avLjX+6bZWZVD4l1Xg/dssNR lcxkjoJxXL+IwjD8xa9WfMhFIlHUQyURKNIZK4h6Fr5GA1HRLZGBEhDz/3TEV4YhjQPt axtzGqNYdFmAsK/Ke9t6NbHP5PgWAE0quNYcfgZEq/tFciQgY2enXYumEwPvTOl5UV04 27KQ== X-Gm-Message-State: AOJu0YyQOCGQfof4a0awObHNvMGjMAlcekW6aGhDzixpVdupXbPSnIz4 qp1BImDkJ7YBQgLR5N2mbolrZSA1x90uO+0ImsTG1UNb4Au1NXCCo4OwCi7eZwJCyZXJFDPTxqI 4 X-Google-Smtp-Source: AGHT+IGKrLiMYgTZQH9v6lPRvzLaa7NsKsfU3OduSWRP1lox3BIouMzFzWS+DjvTAXzbi4xOc8VIbw== X-Received: by 2002:a05:6a20:7345:b0:1d3:1ce:3f2d with SMTP id adf61e73a8af0-1d6d3adaeecmr43774637.20.1727883888665; Wed, 02 Oct 2024 08:44:48 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7e6db2927c7sm10247363a12.1.2024.10.02.08.44.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Oct 2024 08:44:48 -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 v6 11/17] net/nfp: fix duplicate call to rte_free Date: Wed, 2 Oct 2024 08:42:55 -0700 Message-ID: <20241002154429.64357-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241002154429.64357-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20241002154429.64357-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