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 6A73D45AE2; Tue, 8 Oct 2024 17:44:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AA80F40E64; Tue, 8 Oct 2024 17:43:30 +0200 (CEST) Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by mails.dpdk.org (Postfix) with ESMTP id 5123C40DDB for ; Tue, 8 Oct 2024 17:43:22 +0200 (CEST) Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-7ea03ecf191so2166442a12.0 for ; Tue, 08 Oct 2024 08:43:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728402201; x=1729007001; 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=duUHtrwbgSI9v13WgS7RpISl+Az6jcaSeFlxF6RnnhwBEMgEyRivrGj/9rJsXakCV8 mr0177WTXkCZXQYOswwJWvAfkViBrFKxCwKT9/Rx2ER7IOFgu5+k256xT4lrR/CuPW/E fp22IyskkeAQ65D4piQmR9hlxJMY3xcVquc7nFlUzvqfRWaHN+PgHeDIMmwhO397Q0HB 1fs33FLK+hd03B+MHa3TFgagMhJWHZeY9V4mpVPzU2fld2TTjOeWMxuMWtTgbhSMZFXn OU86+7X3LuUHdq3K4n0JrAgHNp5m/XwTNgjxgRg7ZFBDLkjk4Pk4RpZT227UAaXQYqrx gh7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728402201; x=1729007001; 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=oxhqhRYYH5ELT2mgkeo52PtzAuOclTIUrkwG8Ejk2kKGStSoSkHFhwTKrEOh5f7lBJ KNzAmmkIHKffdTR4dSGrMaFX00a/oXbr0QqQk1ZGF8/NgrdErFMGdRFm9gKRamvugX8U 1fSWqXwJYHhzWDEMbBOK5STPIWvI5RFnL3/I4evpK6aRwOiZK183dACbHPy4FKBebIx7 SKMODp7zzGZGQFKZqHxcuthOg2EP6a0s0XcyJZ+lrzCM8L9GWcG0zETIpgFnA3DhWce4 kmE+dJ9nU86JiFczttpG5RpoCzDtWgroFeVuZxXSsqDQI/tpByPxn/v6lBOyVawDUtKV VxgQ== X-Gm-Message-State: AOJu0YzLdlpq6eAwjeDSh+dXHiculzzy+BKI6IeElshzulARlJvCcVcI GHEF2x/78RcWBlPO3GNhOZwFkduA1cKbnFVVwh1ae819uu/PiL2sMC4SY4F15Tug1Mt6m3JLh0Z ELDtnfA== X-Google-Smtp-Source: AGHT+IF85HRw9Tto6j6kJUUy+XfFy1IXXGg+BssvOI0t90RA+wNhvDKiUNZvW92pJZHu7qf30yPDqA== X-Received: by 2002:a05:6a20:e605:b0:1cf:6953:2872 with SMTP id adf61e73a8af0-1d6dfafccf8mr22434478637.48.1728402201513; Tue, 08 Oct 2024 08:43:21 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71df0ccf01dsm6293527b3a.70.2024.10.08.08.43.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 08:43:21 -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 v8 11/17] net/nfp: fix duplicate call to rte_free Date: Tue, 8 Oct 2024 08:41:41 -0700 Message-ID: <20241008154301.66192-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241008154301.66192-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20241008154301.66192-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