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 51F6545A6D; Mon, 30 Sep 2024 20:47:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 91B5B40A87; Mon, 30 Sep 2024 20:46:30 +0200 (CEST) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mails.dpdk.org (Postfix) with ESMTP id 71CB04066F for ; Mon, 30 Sep 2024 20:46:20 +0200 (CEST) Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-7d50e865b7aso3652255a12.0 for ; Mon, 30 Sep 2024 11:46:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727721979; x=1728326779; 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=n8zUQOriGVRTqA/GlPabuAuOd8vttCV4E7uU7bTPpzTI6fcIjd9Ea1OWfezZUjWu4e aMiNAT8fBrIUk69qX776/0NkZ4u9Gn5Ubav9spS5EDdEailmfdi25X1OalIJXen+wYE+ pOGopmW5uSb8Tw0LVgyrRZxYmlwIy6UVLG5xqs1i2/Jjm9JzUiRbHC8z7256j8VfQdHy 8IxaWTm8hMkFKx4fJCXSk9JlfDtrdyLovCBN6/fJWEaxmhY8yzMR+j1dSe6mRVnZfSDF sdFz+Ca2gflG0udD7DVe+t/RuIYc0MiGMCqJJNLNZVzyZeHEBQu796JIgFHVg1E5XkNW eJdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727721979; x=1728326779; 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=QwNiKRFSRpKX3I+8KgmenAlmiiqI1o5h/GK8g7ieYItQtq3Azi3vSvpRKZ9C0C3MMi G8Z4AmUN4huDDfUGgaPVe8lQdq5aTAWrxBNg15UMIz/5fXzHoViqJEEUpord6ZwkZu3S 62TpfH9tp9TpF+MQRFO+L6+7W4BJYLSL6SaMh9BEOgkcIWXxiXiqZeVTC2Q8xOLukpKo +br2cUj+TjoYJQ3LVyeizLFGWIj/Iaxdl80uIuM9V6jxXxGPhF2lfZmjN97yRjJODwbi ZM28G7WzG48lEq7TEK6mGPXVcYSGmrMwD+4hKcyKo76cPazDjYwJC1kWWY23vSx0d5iw FXzA== X-Gm-Message-State: AOJu0Yz9a4qXvUp+ZXaHPdWEZx+l9KlKQOIQR7sYJa2JVHBoSiC5tbDL PRFhx8wJ8BH3XtduVaYtjJTznTpD8PD8I0+v71On7Ng+fBPIeFgSR4ZXO/SRZdo/Vhw7IGzu416 3RvFuOg== X-Google-Smtp-Source: AGHT+IFpVVfH8jYOtVNZN0LoJBMCZEpBJpHxja1n7xzkyccP2ugJW1FWtExNbAs+sB5kZronuBRm3g== X-Received: by 2002:a05:6a21:b8b:b0:1d3:4302:730d with SMTP id adf61e73a8af0-1d4fa6c3998mr20393449637.25.1727721979675; Mon, 30 Sep 2024 11:46:19 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71b264bcca6sm6581895b3a.78.2024.09.30.11.46.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 11:46:19 -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 v4 11/17] net/nfp: fix duplicate call to rte_free Date: Mon, 30 Sep 2024 11:44:05 -0700 Message-ID: <20240930184600.7092-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240930184600.7092-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20240930184600.7092-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