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 E165D45A48; Fri, 27 Sep 2024 22:49:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7AA0440A76; Fri, 27 Sep 2024 22:48:16 +0200 (CEST) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id 9128140657 for ; Fri, 27 Sep 2024 22:48:07 +0200 (CEST) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-20551eeba95so26186065ad.2 for ; Fri, 27 Sep 2024 13:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727470087; x=1728074887; 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=5rIUygztSKBo8hXRl59YcTQfr34c1sPRuIObTaqdxdQ=; b=RfvmyfChNQBqXLhNm9+M79YXw6sERBZyE5Msd4yM1azVbaUVtSUDx7XAfa7nQ0AbI4 OUDdt54Cs3TMAPxo0ssnn/yHjKLYw0JUVpByDDz7T9fXOUXLmttP0IYHQbFvJWb/HRtZ cx2hg8IGJZgzpjFLuU8dy0NuWaD6R0ZKhVXuL7c6Iz345I2LmAUcE0tf7ZUsDUINX3n6 MTxO3u9In88vRrZDxsYq5lATdQeRbmpeXsImfbm5DJMs2W/8p7+Q0zeehK0O+6qMz8LG jM+hpZN4HdaYP1cT0Nn7dm7TFovgkqXds56YRrnUVEt1WBLGDH7tfVC4BhgeiIPciRUY yUzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727470087; x=1728074887; 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=5rIUygztSKBo8hXRl59YcTQfr34c1sPRuIObTaqdxdQ=; b=YLhqwQaBczal7fh8ZV0n13twDOYLojqV1UX57YeGzTm5yKBxunBqrhich9U0JzI1iQ +qvRlogV02eBfsos3xjsQjU3bNQArPnQzDCku5gC1fI3+BV5XZLCKQ3KcHXPbhlG18mN kux8ibI59qg8IJY2u/t9huzfIaZ4bCyKFgrnA34WlyZIgWm+/Ki/y+WBrcnoxpz+BSnR lCpgVWRGFWiBFtfgSg7fy7XgCZa/Ew0hHKrdx21ZOtEbB8vwrzStjmNOrECl61y2GdVE H1wnivZlD5ESD2VmW2UpGYDJizOeHI4nqB/pmN6xk7+G2Imr23GQG3XUbAnTff9baPj6 Yazw== X-Gm-Message-State: AOJu0Ywpd9YPA+ym04UJavWmjDgEyS8vOOi8w/eJ4c+HpyvKKFX3s0gt bkAHoTm4mIgS0q1CakFD2VjsGup45pwuoBvUvZYhq7BvhnRBnAeUACtx/bPu8DhcOwWJqiFjuOV p X-Google-Smtp-Source: AGHT+IH94EZe2HyD5GEjqgLFxSWIRA+cy1VisDDR0NMe223wh6ZCPpXotCB8xoLrjQVkpEg/R5y0BQ== X-Received: by 2002:a17:902:d491:b0:206:a6e7:39c3 with SMTP id d9443c01a7336-20b367d7ce5mr70289815ad.13.1727470086773; Fri, 27 Sep 2024 13:48:06 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7e6db294533sm2036531a12.12.2024.09.27.13.48.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Sep 2024 13:48:06 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , wenjing.qiao@intel.com, stable@dpdk.org, Qi Zhang Subject: [PATCH 11/16] net/cpfl: fix free of nonheap object Date: Fri, 27 Sep 2024 13:45:47 -0700 Message-ID: <20240927204742.546164-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240927204742.546164-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 With proper annotation, GCC discovers that this driver is calling rte_free() on an object that was not allocated (it is part of array in another object). In function ‘cpfl_flow_js_mr_layout’, inlined from ‘cpfl_flow_js_mr_action’ at ../drivers/net/cpfl/cpfl_flow_parser.c:848:9, inlined from ‘cpfl_flow_js_mod_rule’ at ../drivers/net/cpfl/cpfl_flow_parser.c:908:9, inlined from ‘cpfl_parser_init’ at ../drivers/net/cpfl/cpfl_flow_parser.c:932:8, inlined from ‘cpfl_parser_create’ at ../drivers/net/cpfl/cpfl_flow_parser.c:959:8: ../drivers/net/cpfl/cpfl_flow_parser.c:740:9: warning: ‘rte_free’ called on pointer ‘*parser.modifications’ with nonzero offset [28, 15479062120396] [-Wfree-nonheap-object] 740 | rte_free(js_mod->layout); | ^~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 6cc97c9971d7 ("net/cpfl: build action mapping rules from JSON") Cc: wenjing.qiao@intel.com Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger --- drivers/net/cpfl/cpfl_flow_parser.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/cpfl/cpfl_flow_parser.c b/drivers/net/cpfl/cpfl_flow_parser.c index 40569ddc6f..30abaad7c8 100644 --- a/drivers/net/cpfl/cpfl_flow_parser.c +++ b/drivers/net/cpfl/cpfl_flow_parser.c @@ -737,7 +737,6 @@ cpfl_flow_js_mr_layout(json_t *ob_layouts, struct cpfl_flow_js_mr_action_mod *js return 0; err: - rte_free(js_mod->layout); return -EINVAL; } -- 2.45.2