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 2CAF945AE2 for ; Tue, 8 Oct 2024 17:43:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2168B40B8F; Tue, 8 Oct 2024 17:43:19 +0200 (CEST) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mails.dpdk.org (Postfix) with ESMTP id E0A0740657 for ; Tue, 8 Oct 2024 17:43:14 +0200 (CEST) Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-71e053cf1f3so1926269b3a.2 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=kxYBs+oyza51KzCjpGqdrKjXoon/pLJfNxfNt2NeRqEDBKbjNor41Lyz6JNrhiIgdl m/cE7Oqldt8C2vmWG2/ddUhIfLXXR6A00HHlUUSW6MxGsbaBvs3D1TwFSgqqrKrCq8uz Zsl8nqwjqjsHbZxqoIO8Q6YF7RF1DTIhspY1WDbNuNmL94UEpThTIo7gDCWhAUHYbMZ6 kFCDGP1GpRZpleq6+1bf9nDpaWFgGZc3MC08dqK4X5clSeAPa9Yj9pQPtPJIj+g0mj4V 0bGoP2rhB8tty7+FUiZRqB12tyak/KYo35ZEw7YPBAow49pp4SgSUVAigxmw/JVXAkCg bpAA== X-Forwarded-Encrypted: i=1; AJvYcCUzAKXxl0cu+Uz2iVr6tc9iwqgJ7o2itVGQl4PbLXAAfqrmDXURZDO40z4wx79SKPw3GxvB7e4=@dpdk.org X-Gm-Message-State: AOJu0YwN109XJs3c+qa6sD6BljyaZsSG4TXclLbv6E/dpqtv5JmLEuNv gJw7NrJpAdGObZMnuwwf/rOpkLzFwa6mHYG8zCbGUb6v7yDrflyKDwS6MN1hINg= 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: 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 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