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 6CEBD45A50 for ; Sat, 28 Sep 2024 18:48:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6079540650; Sat, 28 Sep 2024 18:48:34 +0200 (CEST) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id 3C52D402C8 for ; Sat, 28 Sep 2024 18:48:28 +0200 (CEST) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-206b9455460so23378505ad.0 for ; Sat, 28 Sep 2024 09:48:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727542107; x=1728146907; 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=2cYQdgVy1X6dw8VoCeBFzYfkLKZs2l4/Y2IfDXVHMDQ=; b=YpcnRospNaaffb+44wv6HDwkzywzXPD7GBVPuM7xS+0KOwtYzQb5RAgYt0gGpjfxSj y3+I9vnedkdjopYqd103mAMNAr//VAR19CZFLMH27qz9wcq6CTgiQ6XqmPeflghm7sV+ CToqozzxb+72O+BmE5vAXeCxc905yJqbrkZp54wHqmEBnVlQAML1hVKOR2PVKbCELgPe qNoSZWD4vmHuRCLjPN+UJ15Q5tNuuhbC1BrAbQNiiXZSM8pPSEcwapu+bkAffaktvE4h s3Nw8gXStcbTUppqoGsjqyB6iaBPh0c4z9zsdCmfxa5PEvv8JmRj8PgJiDMelJ876JvV su1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727542107; x=1728146907; 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=2cYQdgVy1X6dw8VoCeBFzYfkLKZs2l4/Y2IfDXVHMDQ=; b=DnUbFLHgoZXkZs0z1yUwrAuUe9NIVEscYHJSe+/oFBGpUf+7g3kbk53Uc3it6t5eL1 ELsS/Zo+JUQ/nb16CWz4oYY/jKgKheeYHD1Q+te2HeKqEp9L4hGPGSM6Mp2I6UfkDcbL T5ks2rbrnqvy8nSSwfqyF9D69kZEShMuXfJAWwzIaBWDy94aXsP3LjwMvenfv1lLV4wj 8EA8CIFZ12I3fuSh0KqrhBa8zTKrqm9jMzB1WveN4pFLfcCelljJg9P54EtzFmrHIWXP qvaWU9+Uhw0GVxr2aOwIMPzLST6GA2N6aUUMN2nnI8myYeYeXfOpw9tqoeh/kUSiU/xN xWtw== X-Forwarded-Encrypted: i=1; AJvYcCWvlSk4IkgL5ACM70QNHvL7H7EKaUh89Ntdq2e1USsDZGajePI43TLmzOuEYk9h/lQpjGe+Yow=@dpdk.org X-Gm-Message-State: AOJu0YyfpgrJhhqbr/MX0YgBRPpsVz3R5uzMolZI0X7taIlpi/lZUsdd nIaSLKSWkLxuTeSkgwfPzY3onYM/1cYogVSnXch10CIqTr+wKXuV3K4edq7OEPAPr+KHEfYb+/I 1 X-Google-Smtp-Source: AGHT+IE4zKJNatoMiIzh13bFx3/nAF5ftr68QkqPK4mHJIVYaH4ZKMtKzHIaOACNMqij5MZ1Qe+Gng== X-Received: by 2002:a17:902:e5c4:b0:205:4d27:616e with SMTP id d9443c01a7336-20b3668bdcamr108375575ad.22.1727542107416; Sat, 28 Sep 2024 09:48:27 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20b37e47c7dsm28854015ad.216.2024.09.28.09.48.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Sep 2024 09:48:27 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , vikas.gupta@broadcom.com, stable@dpdk.org, Ajit Khaparde , Raveendra Padasalagi , Akhil Goyal Subject: [PATCH v2 03/16] cryptodev/bcmfs: fix mis-matched free Date: Sat, 28 Sep 2024 09:47:11 -0700 Message-ID: <20240928164814.861933-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240928164814.861933-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20240928164814.861933-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: vikas.gupta@broadcom.com 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