From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stable-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id BEC8745A5D
	for <public@inbox.dpdk.org>; Sun, 29 Sep 2024 17:41:25 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 48A25402A3;
	Sun, 29 Sep 2024 17:41:25 +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 C25DE402A7
 for <stable@dpdk.org>; Sun, 29 Sep 2024 17:41:21 +0200 (CEST)
Received: by mail-pf1-f171.google.com with SMTP id
 d2e1a72fcca58-718f4fd89e5so3294621b3a.0
 for <stable@dpdk.org>; Sun, 29 Sep 2024 08:41:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727624481;
 x=1728229281; 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=le4GjgP5SCWBlNQZ0/lUAXoHeoD0MAUe464ixNio0Ms=;
 b=rCjpsfZcsTH2c2CmZoUXE3xS7mjp2VMMBEElHm6RrX7eUi6jQxBzrxPTy1WIN/km3W
 0exH4rNmGOknv4OkbJ/amSUFvoYbIV9dtiTptl1CwNBS+bWPJ0GT5l8iWo+M69wCIYW1
 A6H6p/nYQkoFE2YLAPfTu/diAF/y8l/ComkOneQC9lhTWnQBflNti6Bnsai+rhAPv6s0
 RoB6O+frRnRxjQg1v8yhSjiMVXh/aVrm5hlC1mJBMvmfGGMep09SlySy4BOj8IOG2WiG
 oI+34B7Rc95Vy5KU3EFsocaVPDL/aCjEdsz+L8x77eGOcz7grDgqdg+0gMouSsdir2kp
 LLCA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1727624481; x=1728229281;
 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=le4GjgP5SCWBlNQZ0/lUAXoHeoD0MAUe464ixNio0Ms=;
 b=cbflKIIbMUC4EJ/nfdS276V1nSxAG0poWmYxZonR7bZBt2fevmlBjiCURwuO37Iy32
 NBlcCyprkr9ksufymwDcJ7ugQkujUn4PHkmjUVdH8wZqbZYa7Er1Gz5eYvrkn7mBnpDS
 ROaKI95y4b8TmJA4S0EufQDhQYXNaXAJQdn24qdP79KiTUCc3wcipjHDUDi0fEVc4y4W
 N7Ygfb2Gkel0QYWVQOVFfJPxBf0UcW29mu/WLcWwnBkTOL2J79W9M+KpfdfO5jLSLOli
 Atlr9ucg1BtclHm9sZ3BlVilEBpiLuQ4DyE8+ly0Lp6p6lz/CvtUsYE9kvlPUK/QkZPv
 3I6A==
X-Forwarded-Encrypted: i=1;
 AJvYcCWXXte42M3e8UTLNmlt3aNTESfDFOsGyVjvi3AxL4lDhfCjwCqfTJbyS9kIguYXrAmXZDgd8tY=@dpdk.org
X-Gm-Message-State: AOJu0YwiPvA9ik/25chCryRhty46JQ463lXpvCBqTdE/cV2AsihgUzmb
 mPW6+K8Kh3ayhuy8GxQk0ilGlfqtBXm2KGVHKQ1qNRGpWyCNCoLycE2Nj4bLqY4v8NLFZwbePeX
 RJtc=
X-Google-Smtp-Source: AGHT+IEGyUZrINjIeOG1Zgb8YTnYjeNsdA4PkLyHE+02hb9WFK93Z46H8RKwMbHLqPuqUq3ZB0LULA==
X-Received: by 2002:a05:6a21:a247:b0:1d5:135c:60b7 with SMTP id
 adf61e73a8af0-1d5135c63bbmr3892430637.45.1727624480935; 
 Sun, 29 Sep 2024 08:41: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-71b2649c775sm4707416b3a.29.2024.09.29.08.41.20
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 29 Sep 2024 08:41:20 -0700 (PDT)
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>, kevin.laatz@intel.com,
 stable@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>,
 Conor Walsh <conor.walsh@intel.com>
Subject: [PATCH v3 03/18] dma/ixd: fix incorrect free function in cleanup
Date: Sun, 29 Sep 2024 08:34:28 -0700
Message-ID: <20240929154107.62539-4-stephen@networkplumber.org>
X-Mailer: git-send-email 2.45.2
In-Reply-To: <20240929154107.62539-1-stephen@networkplumber.org>
References: <20240927204742.546164-1-stephen@networkplumber.org>
 <20240929154107.62539-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 <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
Errors-To: stable-bounces@dpdk.org

The data structure is allocated with rte_malloc and incorrectly
freed in cleanup logic using free.

Bugzilla ID: 1549
Fixes: 9449330a8458 ("dma/idxd: create dmadev instances on PCI probe")
Cc: kevin.laatz@intel.com
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/dma/idxd/idxd_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/idxd/idxd_pci.c b/drivers/dma/idxd/idxd_pci.c
index 81637d9420..f89e2b41ff 100644
--- a/drivers/dma/idxd/idxd_pci.c
+++ b/drivers/dma/idxd/idxd_pci.c
@@ -301,7 +301,7 @@ init_pci_device(struct rte_pci_device *dev, struct idxd_dmadev *idxd,
 	return nb_wqs;
 
 err:
-	free(pci);
+	rte_free(pci);
 	return err_code;
 }
 
-- 
2.45.2