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 5798645AE2 for ; Tue, 8 Oct 2024 17:43:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7EA4940E4F; Tue, 8 Oct 2024 17:43:30 +0200 (CEST) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mails.dpdk.org (Postfix) with ESMTP id 9C2D340DDB for ; Tue, 8 Oct 2024 17:43:21 +0200 (CEST) Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-7e9f998e1e4so2505223a12.1 for ; Tue, 08 Oct 2024 08:43:21 -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=Eic6BVDwTvlRyCaygh6PjhzUg841CjLidZBg58UU5PI=; b=iJ1r51PfE9Q+yYIDpY3Njl89AnZ46HznJtDIMPzJQG7X+kkAJ0KJ0vb0wUb6GO11l4 8S31+mKT6vN0HxiaFpsLbBl8ZvIXSTqunY4qNLFVEZjBHD3tSyhcCuMJN+NQEni5kTBR 6bK5YeSNhyYQm7AEZEQ9Xd4KJmi/KGEKvYCy1ftYPb9Wo6wlhQg+DS8EjeAl1nqmhR+e 1ERA7tjFt9GtDUwdGR/KsAkjWU83RYBLsC7ld3tPq2VpZK1B4FPx3SagIemtBevBqgm1 FlWkQZG2Lam4xuoNXtbsWDhFgPHSMz6Ch7R++PGnn/GSoKReF3sK0ULlBRA13u4yjRp5 86MA== 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=Eic6BVDwTvlRyCaygh6PjhzUg841CjLidZBg58UU5PI=; b=hQ1g9j2F4EjrlJNAbTY5dJiRystGVwt98Zg5brhc0Ovt8SO9nq8k0Eo5VxhgkZRR+V yZboUDBG2tu68kgUFw0t89YFJBU61aqjSRIEG9Tx47b0A3fUjHdYDHFRt1ZOvdpyt0gV vWi+OQ3tD7Y+pQ0NFFCivY1I/ZM8d6N/6xe6FPEZoQWqmk5buHPKBo17U6anUEw685tU DnLpuNQjLkfreVrMp6jgEpFfCU/LWcwCOZK1ZsRtUU78+5vEh7wydT9rRJeNHjWOzGFK Rn3CP1HLUCD60hsLO+xlt9z1pnpG5z2+fPnGhEq4iBZtpppe4SxV9+DSrzur4LzPHh+d /DGQ== X-Forwarded-Encrypted: i=1; AJvYcCV2vPpM5J7/BiBPzXZwq28TMmiiBoboFsRIFfFxqc13yc4KsPnicvJF1Sprql+Z0I50w0+08AM=@dpdk.org X-Gm-Message-State: AOJu0YzEVj8pZUvbVhzAlvBVnZc7bbCv4VBuGoFnchtMMGaL/exDcA6L WS5a8UylkMb7vNwUA2skdjSfIqlHsUwUdeZQevBh6mw+8exY7K8QGhYw5uXuIO4= X-Google-Smtp-Source: AGHT+IGVJwLTNwjR8p8O+D57RU7CBwqGSxXyxaZz/8R/HhOJdq9a5lA0OrBQ8Uk932f9Hoat9ytMow== X-Received: by 2002:a05:6a20:e605:b0:1cf:6953:2872 with SMTP id adf61e73a8af0-1d6dfafccf8mr22434425637.48.1728402200787; Tue, 08 Oct 2024 08:43:20 -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:20 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , wenjing.qiao@intel.com, stable@dpdk.org, Qi Zhang Subject: [PATCH v8 10/17] net/cpfl: fix free of nonheap object Date: Tue, 8 Oct 2024 08:41:40 -0700 Message-ID: <20241008154301.66192-11-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-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 011229a470..303e979015 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