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 5180D45A9F; Wed, 2 Oct 2024 20:40:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 330F8402E9; Wed, 2 Oct 2024 20:39:47 +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 483F840656 for ; Wed, 2 Oct 2024 20:39:38 +0200 (CEST) Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-7e6d04f74faso154435a12.1 for ; Wed, 02 Oct 2024 11:39:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727894377; x=1728499177; 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=Tioug8G0S4JIk+fsTHsmNYFxuWE3pnEjoBz+g9EgLaH3AEGx79i8W8FWDsWBH8aTYd hOxSiQEGK/9Ohr10S97LB49IB7e/41g4fJ1i2mzQCjZrYw/oRAwWqx60h+KgOXovrGnX ZD+IpOPD8SwMdY33w3VYvE6lDf2Nr88yRbvNSRUbIt2tyY2uyuzLFLkar7f3Q4VHjCvP DIxAa0WFp0k1+Aut8ZEmHF6osEfYhtWTqbjlQrcAdWExTV5GN58TSS7/A/a/fY2ZGS6m CAIBXU9PMS85jI8vqBRyoCcHOg1cDC5o9aKuDPA0yPR/5O2ATo9teJHIFjn3C51tYBEH 67mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727894377; x=1728499177; 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=p9wrzHaVLeaPbUUTw7jqGeA3femQmUL+n0HVP+1cRPvw3liAPb5quC5gvq9/nZG7dS fG0A+P10Pm4m/OwyhaRZO6Ni70RSMyUtPqv18SJGFvoAdvA5FPAFOW/o0fQGQ50FZ4SK DgK/FeqUE9dP7LOYsetIbtjMW7mN2WC95whdxJLZLFt5v4IH0u0n5a6pS26gXULvyvrT BJYC4AgBwCXxuF47TIGJeiT61HoVrtT4+tc/iD/5SZFNEvUa5SrVb/hk/stMlug0Zye5 vekOLc0+wfzBhawFvpZfi9TAKvTVMfxR8qTOySaZGjn4t8mecyXnYqhi7v1+LeVJ69uc Zz5w== X-Gm-Message-State: AOJu0YxgpRSQtsQvu98i/Zumy8MGYraP/NGC/D7MrHlGdEZIIXZJI+8y nlyOcyMwR0uoS3NUTzcQh3TcRoTOpiG/W7gZlXwB8GWX6QGRg54BFGpbv/tc/+VJE+p/byW7oGj U X-Google-Smtp-Source: AGHT+IEaWLnXERTs33ugJKG0gNPpQFWuJLXFMaRbpkVmtvL9PaUtZH0byw1GQRcjS/dchMJkBwyqdQ== X-Received: by 2002:a05:6a21:3183:b0:1d2:fad2:a537 with SMTP id adf61e73a8af0-1d6d3a8dfd6mr819921637.18.1727894377501; Wed, 02 Oct 2024 11:39:37 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71b2649b0bdsm10104362b3a.34.2024.10.02.11.39.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Oct 2024 11:39:37 -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 v7 11/16] net/nfp: fix duplicate call to rte_free Date: Wed, 2 Oct 2024 11:37:49 -0700 Message-ID: <20241002183918.161656-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241002183918.161656-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20241002183918.161656-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