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 3072245AE2; Tue, 8 Oct 2024 17:43:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F004E40A6F; Tue, 8 Oct 2024 17:43:17 +0200 (CEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id DBF8C40655 for ; Tue, 8 Oct 2024 17:43:14 +0200 (CEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-71df7632055so2979034b3a.3 for ; Tue, 08 Oct 2024 08:43:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728402194; x=1729006994; 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=iuNayhWy1Q2KV5NuT+txJG++Xies/w8sMO8eolMTMf8=; b=VaSD/RtMQX50ktvVPMVqiutzsG9TaF7SUqGZRac6xmH8zKuecW0HcovCVdsEBkZuwM WLooDTcknAYRqPw9ikx6I94IBwJR8AuxSYgjSF3O/SQTKzlNbkHelAh00w/2Eg+kxjf2 Ms1jJZCyEEls7r9ui6xUtt5IjH1pCbzBqUowX4i9+PRYe0HBFTPaOsT/RQivpNA0/qxK nLcQmqEJYx2W3DibUOeJu/ARdXoKW5I3iURpqxl8OmB7o5FXjOkbcv8Ad1lBQoCPzdHY mbCCPVC1eFZ+RY1n+LWXQJrCkoxbf7y2PapcH/wOyCOu5Y16VNWrnejmkARtBc4vTsNC M5AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728402194; x=1729006994; 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=iuNayhWy1Q2KV5NuT+txJG++Xies/w8sMO8eolMTMf8=; b=PIktjKnL2zGxMutLbkiZKKY2krT8i064B91tHnsbrtBTEtoZGZKSH06nj3yxaAlD/w 6WlxW5EgY/J/lh5cUlqYxIx/m03JPIR/iUBPkNvSTKCTbZkuVt/hD2gsKX2d17VlwfeF AE14N/3gWPMxD7yCxK8LGm8FE4WArM1Z3tbo/B8SvlvoyjNOWuvxWirh+1ixDWKd7KIl YA5AjAVUl62SVwZvunyLlaJbyJCTNkHMS4BUUMvtPa5wCrGTSxxjq7Wd/GcE3QD0J0Gi r10YXq/e6lZos2j2Zx1cbrYs8m+LDu21q9FTh25FgMeZVRwju5o3e7oF2IsVSu4dGJh+ eTOg== X-Gm-Message-State: AOJu0YyHpIQDt60/up+auSUPQmFOid3+syo8gxToSkVDjMyLgO3SxvN6 xb/PltDBxcYrB76Y3jBcO3L4W4rfR0iiJPmoZlRO9DuToh6Yx/2lrmSRQZel9Ha75zjo5rCpsND 94O8iXQ== X-Google-Smtp-Source: AGHT+IHsfasOzxHB1H5Z+s5l4hnXE4b6rBrS5/XMDm6jGCB1JeSEgequvktjF9asqSknC32NiS214A== X-Received: by 2002:a05:6a20:c793:b0:1d2:e9e8:5e78 with SMTP id adf61e73a8af0-1d6dfa4270dmr28615922637.23.1728402194038; Tue, 08 Oct 2024 08:43:14 -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.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 08:43:13 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , stable@dpdk.org, Ajit Khaparde , Vikas Gupta , Raveendra Padasalagi , Akhil Goyal Subject: [PATCH v8 02/17] cryptodev/bcmfs: fix mis-matched free Date: Tue, 8 Oct 2024 08:41:32 -0700 Message-ID: <20241008154301.66192-3-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-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 device structure is allocated with rte_malloc() and then incorrectly freed with free(). This will lead to corrupt malloc pool. Bugzilla ID: 1552 Fixes: c8e79da7c676 ("crypto/bcmfs: introduce BCMFS driver") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger Acked-by: Ajit Khaparde --- drivers/crypto/bcmfs/bcmfs_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/bcmfs/bcmfs_device.c b/drivers/crypto/bcmfs/bcmfs_device.c index ada7ba342c..46522970d5 100644 --- a/drivers/crypto/bcmfs/bcmfs_device.c +++ b/drivers/crypto/bcmfs/bcmfs_device.c @@ -139,7 +139,7 @@ fsdev_allocate_one_dev(struct rte_vdev_device *vdev, return fsdev; cleanup: - free(fsdev); + rte_free(fsdev); return NULL; } @@ -163,7 +163,7 @@ fsdev_release(struct bcmfs_device *fsdev) return; TAILQ_REMOVE(&fsdev_list, fsdev, next); - free(fsdev); + rte_free(fsdev); } static int -- 2.45.2