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 B9C8D45A6D; Mon, 30 Sep 2024 20:46:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4EF2E40656; Mon, 30 Sep 2024 20:46:16 +0200 (CEST) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mails.dpdk.org (Postfix) with ESMTP id 912CC402BE for ; Mon, 30 Sep 2024 20:46:12 +0200 (CEST) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-718816be6cbso4028748b3a.1 for ; Mon, 30 Sep 2024 11:46:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727721972; x=1728326772; 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=Hc9y7DjBttxYz7nBZ4MjIzmaZTTq6eSG6CNcglW3MIU=; b=SIKGl1OwmaKWAqIN8GegXjiB+90HFxrF48fehn7Zw/wF97aWDma92zEOz9QR6oVxa6 LcWtEGvhBfjGncbo71M8qHJgjS3z2LVINbcXd0jnwyhtwWXdoTxQyfxPrum7mSNJN/wR Nb4e5xE9hNFWU2CFBeaJbaPI2JVNUy9Yo34SO1usyPMfu0e1NekiAR7JPDmCloIs8ezw Pohd1JHfXzeUAkLSSzsibxc8RBmIylbmtJQLBNKv2lcYQ5Gtfw56ymHlQlk4xvYr0XNd SoF1zFDey7EYFFFbbxI3Nq/wLEWG9u754plGfqtx/eF7R1r+M6z9DUiIQK8NB89t9k8O GLEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727721972; x=1728326772; 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=Hc9y7DjBttxYz7nBZ4MjIzmaZTTq6eSG6CNcglW3MIU=; b=tNUI6lcPM/493dC6AGW8wNCa8NGIhmB8Jlu/zCxC0BV9G61Y0qp8DgSzWbx08N6By5 prp75D67xlIfD4UJM75AlvVZt0E0QV+PcZFwtWkKDsCIQ0CGgR1HwWdHHvNT3pDlVixS GwoawHaHLf18ndXobOmFLjD3eIfTbxI0asDCdzXL5jPPUcnMgiiiRFiQdCTBJexYFWtl 5IV2979HBCvujZxWVJUhFdBmsaMbLyMYzvOguzwkz2F9FNKiWNVxAjbsTECm5AeW842Y JGO1uw4jf4G9lBZWaF0Btf5VKw2syLgQDAKJgCqSuq2ADWNJNLCNj1JyXZPeWkwKkxHe aGVw== X-Gm-Message-State: AOJu0YyUdx64UzCJc2GIX75DE70oDZhNAFufH7ti98t8m8P0McSs1QUO 0brITVegUZf+JTndWLgVCJDOmtH/krNdLprGGzmPtBRHGfOar8olpY2CW4fekbsxxCvSfLdbEst kyvhxfQ== X-Google-Smtp-Source: AGHT+IFQTLkkBPiok8KiGeKOLJKo3t3jD4giT6uTa2QZATqcnvjR2vRq/PhkIGobQ3jLblrWG+U0HQ== X-Received: by 2002:a05:6a00:398f:b0:714:21f0:c799 with SMTP id d2e1a72fcca58-71b25f45eaemr18480834b3a.12.1727721971733; Mon, 30 Sep 2024 11:46:11 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71b264bcca6sm6581895b3a.78.2024.09.30.11.46.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 11:46:11 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , stable@dpdk.org, Ajit Khaparde , Raveendra Padasalagi , Vikas Gupta , Akhil Goyal Subject: [PATCH v4 02/17] cryptodev/bcmfs: fix mis-matched free Date: Mon, 30 Sep 2024 11:43:56 -0700 Message-ID: <20240930184600.7092-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240930184600.7092-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20240930184600.7092-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 --- 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