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 5FD6C45A7E; Tue, 1 Oct 2024 18:38:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3278940B9B; Tue, 1 Oct 2024 18:37:37 +0200 (CEST) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mails.dpdk.org (Postfix) with ESMTP id 4C8734067D for ; Tue, 1 Oct 2024 18:37:29 +0200 (CEST) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-71b00a97734so5016806b3a.1 for ; Tue, 01 Oct 2024 09:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727800648; x=1728405448; 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=ojL7MLMS1g0CYANX1kSwkMhH1QtzpVkbnpSH1ksx4WCQmuoABap7IILX8IfMX33Nsd ssOIy56o+KavEbTGsLN3v/X/vyctpgBsUNmtnr5izJYBfCcYqLpwOEys5QhycAc0xgH7 W+TJBUSoN9UYM72whQSMSKiD236b1EDe4kTjzRl8DeSR8FYzNj7dNcO05T3SoUXws0vA p/y4QYeqZkoVicDYOjaISDHINJb2kqlPuh+DhS88GWpw+14sw8Ra8WrmUJysHM7wXazZ avdUGiLYOqTqZRJk3OV5z95PTJyjviElULc3o07B0CqwPEs6fKa9aS/VBYosRyal6HdN EFaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727800648; x=1728405448; 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=ZDdhBF/9E13W018QKel0tkOW73H0y54GjPJmb8pbdm+m0tkJOcyigwBi1H0isea4Gm 4o9m6teWGwArOUxoMyPauI1o7rHlYxWz3kV+1ouZ8u/vHpCXtqFe2qnlYl6vN7nvsnum 4YkNeyUpC9ZKYPes+AiLOi773lhZ7TeET9esVofkoyldvrbU5kVpTWiG4Q+sW/IkRzO5 Slx+WJXiHSJ/f9RZiCzVPH9SOgCN6w2pEksBEZnh/MEYGunx3Wr9zJl/z1HoHTVnfA+x X/h64rwF3tePKLy0p+6twP8zp9oi0SX4EPuxCVO0nUPJZcQ2iKy/81JsYJFwYoxdahbY QBfw== X-Gm-Message-State: AOJu0Yz8l2ekYS7F4DI7IsfZGzfra/ZSGyNvqCEkGaDePCdJGU6qppCc wcYD0B4s1j3pZLmer1xZ56ggTKz5yR/Pa4SJsRdanthRZsbMIiHCqv7Wu0jOMZYimxLtV76nffS Tw2c= X-Google-Smtp-Source: AGHT+IGshPEO9L0pm6+JOoQHTqXnrIZbLib5VWPp3rGSZkyiRN8Yh1t/aQwuwM/na8JBZSo8B3LOmg== X-Received: by 2002:a05:6a00:2ea2:b0:710:4d3a:2d92 with SMTP id d2e1a72fcca58-71dc5c48a91mr421118b3a.4.1727800648578; Tue, 01 Oct 2024 09:37:28 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71b26518818sm8213565b3a.129.2024.10.01.09.37.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 09:37:28 -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 v5 11/17] net/nfp: fix duplicate call to rte_free Date: Tue, 1 Oct 2024 09:35:34 -0700 Message-ID: <20241001163708.355128-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241001163708.355128-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20241001163708.355128-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