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 C63CB45A5D; Sun, 29 Sep 2024 17:42:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E53840697; Sun, 29 Sep 2024 17:41:38 +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 CD62840613 for ; Sun, 29 Sep 2024 17:41:28 +0200 (CEST) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-71788bfe60eso2733677b3a.1 for ; Sun, 29 Sep 2024 08:41:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727624488; x=1728229288; 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=E+4O3sXsemsOPjjholwytqNHsHwSd6Vlw8zL2M0ZUN5ZG7TMbo10TNkmNJYpbJtA3Y bnMCl8FOA2untV8WfemjIuKef/QdYpHn860ZRXgsdQ+XbIsFDknAK2oNg5qmafP5WYnh CEBULVce9LxCk6XUQw3ocDkw+Sqnr7ppcd24qK3ZJoWtFCSlvGAfLX30Z2Vrx+O68hB7 T8l+dimq3FELoTYYKYQC4a18kJqq7D6yU/9gQ7b9yKxYB7cSgvi/5gMqPi2yXSj/WXKh DFYpVDdp4YcIIXIeQw4vF8eGU05smHkaF9miYYzFq2P6QAOf3huC/YIFWVNLQM86Jj9q Ig8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727624488; x=1728229288; 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=Bgm9oO2fpEAPjKpa9s7ApSPs5dpJ02Yom+MLXOUTiKpZOHZepvOV9swen+DcCP2+nj 9DUWubsjdRc6hhr0B7QF5u273wjeWu+DG2MXck//y9XlR5T1V9SCfyW+lLU0euSGk6nG lrzsCeQdo6UWLBZDxum277L6jOXhF5V7okQQthzlqquPfaPr+DDJPW/3+VFMLEWwFCv7 Fns9yOkS5E1c+/PKnYwt5ncC21UkeHBHrJvOHiuWmepm/ur/l7YpUPb3ywqVwO/J18H8 C2dM2Gy7YUL6IKdBCphUcMGQJAB3wsroYV5dL5SAzfwOvywgqP6PfoWYuNLV4cxKxkx9 Qxng== X-Gm-Message-State: AOJu0YxsdiLAHvHZUfdNjaeiELCm3xd/GP6+cbiORwqSPf+h0arabnFK 8FfN1reUPv87J/v+dsEMfX7twTD9fRgpx2unaaDCDDdCCJJ5r2QPasSLOnagwaclCI+/bvxCDBd BFbs= X-Google-Smtp-Source: AGHT+IHGLizm1vRS6t7ZAKE4xAktiboIeqBu6WqsOBCMnml4jyanQGemk/Wwfsez10NBToAk9m9qbA== X-Received: by 2002:a05:6a21:2786:b0:1d4:fb5b:bf44 with SMTP id adf61e73a8af0-1d4fb5bef84mr11305421637.5.1727624487977; Sun, 29 Sep 2024 08:41:27 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71b2649c775sm4707416b3a.29.2024.09.29.08.41.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Sep 2024 08:41:27 -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 v3 11/18] net/nfp: fix duplicate call to rte_free Date: Sun, 29 Sep 2024 08:34:36 -0700 Message-ID: <20240929154107.62539-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240929154107.62539-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20240929154107.62539-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