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 AB4DE45A7E for ; Tue, 1 Oct 2024 18:37:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BBE9F40A7F; Tue, 1 Oct 2024 18:37:35 +0200 (CEST) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mails.dpdk.org (Postfix) with ESMTP id 19C994067D for ; Tue, 1 Oct 2024 18:37:28 +0200 (CEST) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-718816be6cbso4887338b3a.1 for ; Tue, 01 Oct 2024 09:37:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727800647; x=1728405447; 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=nGsJGNsENwbNJb+xf63s5McDf0flBykHBwbmesytQN4qGfFNI703T2TecJ7n+Kikp6 Pj9yQDn/s2j/spTDpwHqU5RRIz8yIrrhFU0f8Ru54fdrXJ1KP1LPdSSaNrDA+0WTrgPO bVxf0SxN46RN/XHd+ZLNdIeFuX3E4HJ+dRH2krbj5o2TjQM1cAZxbO6aPE/cE7h1UsS8 dt2KYs1XXfO+sHW1DqLCl2MONRAvlw+CwrNovJN7diDy+72ht0Rc9dsYeNvjEYbXAtmx fRpbHyk+iWXh6zvoumosk9EsYSyIq7JM+B/y5H+7OcrwGbMEeHgPlZHhwGUgj5WbP0Rj MENA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727800647; x=1728405447; 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=J4AuJyjH4niuWkvRrgeQUFfZsUp+logMRgFxr3HJsnhwe8l0i583V0gxXezo2z0+yH HdSlh25YA5de9XgxsyjmQZcNUwRFvYc3VAgPC/yls9DnuQeX5hEkhFDzME7RjKBTlonI PTYFkq/yFNarxKjlWajcAKluZdg1OkDvD6QreLlD7CtrgJtYCrF58vCOz5LXM/BwCuBc MGruTW08slz9qbCr1KdPyLEAMynL3xUTAFHijo5mkqwRXkeeIg9NSMPeO/u/9fdKfCeK KPosbPX+s6SmO5oWWswJL/iapeiQZFUUegzoyNKT+EaAIju5xXdGliWVo2e7KtZa0Khy Ec5Q== X-Forwarded-Encrypted: i=1; AJvYcCUXy3Lq/cXV/5xz8R8s3cLzCOKftT28oQwBCfRdj/HZtFVCfE4cgSAhutFoGMgoP2qnLGe5Z7s=@dpdk.org X-Gm-Message-State: AOJu0YwEY2/cErqYQnZEXPtOqNzYz+LOiNqhzmgjMgK1RWklq38WLaLS C0jkMaTDzowfjxtkESbmNslnD0QnQ/Tln06Er9Dw0Eg0okLGf81UakCnHcu3lXQ= X-Google-Smtp-Source: AGHT+IEKwEMSq47M+rAX+lADldSbG/LVTEPX8SQH5du853DoXG5m5niQlY6KGvilPD3U/QHtpIBeZw== X-Received: by 2002:a05:6a21:178a:b0:1cf:2513:8a01 with SMTP id adf61e73a8af0-1d5db1a96b9mr424964637.26.1727800647286; Tue, 01 Oct 2024 09:37: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-71b26518818sm8213565b3a.129.2024.10.01.09.37.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 09:37:26 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , wenjing.qiao@intel.com, stable@dpdk.org, Qi Zhang Subject: [PATCH v5 10/17] net/cpfl: fix free of nonheap object Date: Tue, 1 Oct 2024 09:35:33 -0700 Message-ID: <20241001163708.355128-11-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241001163708.355128-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20241001163708.355128-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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