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 22EA445A9F; Wed, 2 Oct 2024 20:39:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A41B4064E; Wed, 2 Oct 2024 20:39:33 +0200 (CEST) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mails.dpdk.org (Postfix) with ESMTP id 4AE24402A7 for ; Wed, 2 Oct 2024 20:39:30 +0200 (CEST) Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-7d50e865b7aso56053a12.0 for ; Wed, 02 Oct 2024 11:39:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727894369; x=1728499169; 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=twrnFk3+K8eQ29TbVsTaNHI7oYXzVyQdc3k0J+VFos69tkDrWGAeFQ8BT49F4lvroA /RS58zfy+hQcdgHR6eFLh3hIEOglbHaK/UjSNd7XeV5DASVcuqMEiG+wDpXd7pkkPqtj 8ubeOYMM9JFg8acJgOPNqMGDSnd0jImVxlDEi/FlEkEdJuWV1b48Pj/TZvDoQuiTaGDW 09KzOWbqgy2X59ItwzPVRkPDUD2fzbxjo3RonGPob6KaDkq0N62UXzVC90qFQgh9Hjp/ PIWdCtMnUc0VVJzjunLAFuy5B613HNoRxeHS/v/8G4xdBlSGm+ORBDVuWoHZUVD3UHZY DStA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727894369; x=1728499169; 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=Ip3AjbuYaBzO2R8D47Ed/uihR6kOUlcYceQaA7BZa4C77GgXitL65kIjLPxZONHDdI 8GzY9JosrXuMAc86p2Te5/VrMgIL0CKp5cZJnR00D634YeJlPwla3179Z0FZjb19W7qB XQE0/wwNMBfFSiTHDhsc0YEogJn/gLt7CjwfCuHjpdhC8ciWfIzRw+8T7IzbkIVT4rLS 4QFiKn2g4oZKwbElrm6YBlr5GwZisus39HQzG6J7PWZZSG9SM0qH+daxgEuJYMp8Zhqd e6HqREkjTigS424R4Pqi1I9BuZE7T+I0fokwDR/AuRAJL6Jtlv8Hp5lWpFP7hg143FE7 4Q+A== X-Gm-Message-State: AOJu0YzK4/KY2VxZS3mBA2i6ddj+tEHnNQAKONv7n4uTlIkgmPO1s43E hvk1c0ESVFcwOFR9QWDHQADveTsxPCX1C3KaaamYP5JXt3wkIUFpuaHpJuY3a6gZVZcuGQ0B5Hm 1 X-Google-Smtp-Source: AGHT+IFHwETDw3DnWaH9KdCGkAHEvn0XYrvnO7XknHnD7JaZG8LwaO6zyEA+53LcwXM8MIFJZrGPWg== X-Received: by 2002:a05:6a20:d818:b0:1d5:14ff:a153 with SMTP id adf61e73a8af0-1d5db20a5a9mr6217784637.12.1727894369547; Wed, 02 Oct 2024 11:39:29 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71b2649b0bdsm10104362b3a.34.2024.10.02.11.39.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Oct 2024 11:39:29 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , stable@dpdk.org, Ajit Khaparde , Vikas Gupta , Akhil Goyal , Raveendra Padasalagi Subject: [PATCH v7 02/16] cryptodev/bcmfs: fix mis-matched free Date: Wed, 2 Oct 2024 11:37:40 -0700 Message-ID: <20241002183918.161656-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241002183918.161656-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20241002183918.161656-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