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 5416645A48; Fri, 27 Sep 2024 22:48:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 529D340654; Fri, 27 Sep 2024 22:48:07 +0200 (CEST) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mails.dpdk.org (Postfix) with ESMTP id 75D6D402EF for ; Fri, 27 Sep 2024 22:48:01 +0200 (CEST) Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-7e6cbf6cd1dso1870381a12.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=pQjnd+eAK9mq5lO3iBB/rMBh0B2adSIwFhdBIQmZ/jq0S6riOW9uIBgGLyvR7e+/W9 pBgxdDlbo2HfiFj8XZVG+mSPe+n0f2bU646zVYxlCH1+pt/EQMShGhicWKAAktnJhzgi dP8L2WySNjYVN9nbpGqoa9Jy/03p9g4yri2lIBYySHPhEAR1rtcfIA5kJI5sxMz05ksj shuU27EBwAc1LVjhDj9iGP40tunqWfa+36Eonwc0NYor4EHkCvhUBQp7nyM7CuwAaR7E MacIG11mc1T3x50zFZJqcgbTuwy+PWs798oivMX2RD5RVmFO7a5yen/JLqJ2gVXZZ6rS GFIw== X-Gm-Message-State: AOJu0YwdeYp8IfFlU2K0x+umhDpw7kx5IALvCYNq31oVuVsVZwIXOLF3 /aM4Ov9CVfykwwwXTZIRDr67VyAaa7NndXOdjykSC/wDixZHNyRGL2b8QenC9bl+4B10wTk7TL/ O 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: 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 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