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 D228945A48 for ; Fri, 27 Sep 2024 22:48:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2879E40651; Fri, 27 Sep 2024 22:48:06 +0200 (CEST) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mails.dpdk.org (Postfix) with ESMTP id 6ABF6402EE for ; Fri, 27 Sep 2024 22:48:01 +0200 (CEST) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-71b0722f221so2012396b3a.3 for ; Fri, 27 Sep 2024 13:48:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727470080; x=1728074880; 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=v8Aok7msKv3e47qbX+0n/i5gaFzOgWTvqMZUsJlTOls=; b=dU4RHY3O7hJD5ZHlcCSAXQn4FSXbO8TFIAh3oDWNTt+T6ACRowhSuhI7stwzzKsvuJ IpZJ4zFOn5lUFgN0QVujx8cWnKejFWOEYkPeBGyBTf2QXB1CPs0I4Rp9TiZaaeYT8ydZ Tyk/Of6pnGGhZAh6xtAh+8ARgw4qvm+a5aH/H1EVzrCQgcvntu+oD/WyclQpecXtQfmO 46eXyzVweC5h/oGOYn3nXZUTXjvhkL9ta/pXpyXJIwmicd2rJ37PeB1SdocbIAxWVqLC Z97Ka/cvjl3OJiQq/ZBMsfCZlxPAZJ2rOwfB/IjptxTdAJWUixlWSe1a0XW1LpAmp0tZ 7xdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727470080; x=1728074880; 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=v8Aok7msKv3e47qbX+0n/i5gaFzOgWTvqMZUsJlTOls=; b=pkuE2iGM6hiKu8cIvJ9viTJdY6AMy/277U/II24grtA6XJS/EJYh0Bw5b+P6eWcGZx qsAatA1feBpozxRrzzK9Asg+HsJO/YlS5ihPtXt3iZCZjAiJEVLNhSdLKa5NrsDhNgqb HVkWU8GECNGFUppH3eV9irZP6FU2Ev8rV+2LcvPT9t41PVvcJp1euVN56BqYAUB4psDt T83LOBDEhVjL5cbua9p5cZTeFiDhKie8sZKANsCq+x0wenoSvZj5ri4kn983ul6n2B1N ocZ9EviYT4HoVc+7M+UvGIiC5FM3tVvfrM+pty/nQkS7B4g/RzPOYWFinb5TEDRUiHHL RKUg== X-Forwarded-Encrypted: i=1; AJvYcCU5L9FTkM9pobFj5SJLVqXl9pYpycq+Vo8bM3aDJbu499DdjUIFPu0agFjeYlz7ZsV9XkCswno=@dpdk.org X-Gm-Message-State: AOJu0YyEP5C12naHk0+rU+Ncv1NDd2TREp8s+WXeLT1zZWJ/1ni/U7Nr sMycH9kNE7SQqc7u0ALjzWWQ41pflQIOBR+Zg/naUyOQYWN1SyhqGvC7uXxU94g= X-Google-Smtp-Source: AGHT+IF7iyZE7x2uF+sVVDIoRzvT0UdC4gkNZ6/LR9LPQiYd3KelHiCRpyWSuzU0YJbM8pgNoCIJtw== X-Received: by 2002:a05:6a21:4d81:b0:1cf:4102:9762 with SMTP id adf61e73a8af0-1d4fa7c5d0emr5873292637.42.1727470080630; Fri, 27 Sep 2024 13:48:00 -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.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Sep 2024 13:48:00 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , sthotton@marvell.com, stable@dpdk.org, Pavan Nikhilesh Subject: [PATCH 05/16] event/cnxk: fix pointer mismatch in cleanup Date: Fri, 27 Sep 2024 13:45:41 -0700 Message-ID: <20240927204742.546164-6-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-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 The code to cleanup in case of error was passing incorrect value to rte_free. The ports[] entry was allocated with rte_malloc and that should be used instead of the offset in that object. Fixes: 97a05c1fe634 ("event/cnxk: add port config") Cc: sthotton@marvell.com Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger --- drivers/event/cnxk/cnxk_eventdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c index 4b2d6bffa6..08c6ce0c07 100644 --- a/drivers/event/cnxk/cnxk_eventdev.c +++ b/drivers/event/cnxk/cnxk_eventdev.c @@ -121,8 +121,10 @@ cnxk_setup_event_ports(const struct rte_eventdev *event_dev, return 0; hws_fini: for (i = i - 1; i >= 0; i--) { + void *ws = event_dev->data->ports[i]; + event_dev->data->ports[i] = NULL; - rte_free(cnxk_sso_hws_get_cookie(event_dev->data->ports[i])); + rte_free(ws); } return -ENOMEM; } -- 2.45.2