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 54D6E45AE3; Tue, 8 Oct 2024 18:50:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 36F5840F16; Tue, 8 Oct 2024 18:49:13 +0200 (CEST) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mails.dpdk.org (Postfix) with ESMTP id 6094040E2C for ; Tue, 8 Oct 2024 18:49:03 +0200 (CEST) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-20c544d34bcso8930355ad.1 for ; Tue, 08 Oct 2024 09:49:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728406142; x=1729010942; 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=h42zeR1aHdv4pOiMHrf2pxNKjkF2vnHhE8AigCt3DUk2OAEUm9pKyxKbTrq6h1frR5 Sfig+fhsh4cYl9Zq/tS0f/hSj/YRaIGkxSaTy4DziivcmRQwC5D7nG+hVw3/PZ7mAwPv 3l6XTW/VwPhhsuOiRS+yXza3alGB3w81l8B7pFtQnRb/ysQKj961gvr4XdHb5+QAy8Iq i3x0N+Caw0TWw8cZ8bX8NFSdGzZK68YGS+1DW4+1lxhUH+v8AJxMnQTFx2GCAFQ0jqa0 NFBTvs1YUJoy6uefaFDlCf4e1uYjP5f3WB8eOW2uCbjzS9IhmrWfvPatqG/vaaDDtLcJ 3nRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728406142; x=1729010942; 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=QUiYRS6DNyOy0sg6y0lI5rctdIdNXwRO/DX1bAXOTwwsAqPX42ilZgPE/Ri3E1uPnw F+Rol7rIetcyiGOYeqbAeFDOWN5E3nq72HI0SKrDs/gZdTCE04l9IHlXCg0ASAiNUKny RGKP1yEYnnfM5attc37I8yeQA+6tfnNJvyGOa6j6F6ZmGwN7R1n/Kbeii/4t8RAXtolK 8xsuozwOkf9MfhKRIaOWZcN6ew567I2pDC+QtixG2xkYbws6QXQTdh3y+HDYKquSa5nz q1UWIYrrGc6noCW1OSAV7mTfoBeCK5YOGRecjDfjPCmOMnGRt3i68BTS9wGRaLDZNxhp A6KA== X-Gm-Message-State: AOJu0YznRVfFng4XrxcF0AVX5ecZGeDNAHix0KZrEfkbBZ9q7WsHiBhy wDBA4tf1GNu6abzPa3b5aAaEVOI9sd7F5RDWhXSqGElgcRlZc7e2pQH6gPLlxHkRzm3ZffnY9rd KzyPFJA== X-Google-Smtp-Source: AGHT+IG1qmpmW4lmLkMJaDqN/SroBhp3Q+b1V6GQAZ6/l2AxxbJOfKF9xgj/JfBmn8ouUEUVBQdEsw== X-Received: by 2002:a17:902:ec8d:b0:20c:5698:75cd with SMTP id d9443c01a7336-20c569878a3mr35118455ad.2.1728406142616; Tue, 08 Oct 2024 09:49:02 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20c54056bd9sm13832965ad.85.2024.10.08.09.49.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 09:49:02 -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 v9 11/17] net/nfp: fix duplicate call to rte_free Date: Tue, 8 Oct 2024 09:47:15 -0700 Message-ID: <20241008164842.139045-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241008164842.139045-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20241008164842.139045-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