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 4426345A6D for ; Mon, 30 Sep 2024 20:46:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1D55140652; Mon, 30 Sep 2024 20:46:16 +0200 (CEST) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mails.dpdk.org (Postfix) with ESMTP id A4986402D3 for ; Mon, 30 Sep 2024 20:46:12 +0200 (CEST) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-718da0821cbso3672303b3a.0 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=TRg/Ar5Kdz3+BAc3tFBftpeL0e8P0uChJZrv83c9K01K7863OtxGL6d/SuthHB+uzS yxt3p7jDhR1PapGZknT/v4qx4aP6mDILqgJpulLYUBBHgmi2YJHSsQ64/LxOwm+BlApb 8dHVkbrz/4f0j/qMexJmX1k2lk8WQ5UWGMmB1z+/RgdsfIiKRfXRO/5JzdrS46nmXGlz 6JWhGrzsnScL41sYuNt7U1oxCr1km2QWP2knb2ZOf5f2E7DuM5hCY20bhMlNVmcEURgm pt2VvXXrmnXLC9pkXNMkxM638LxUCo7rFWvwNuNFNqL7Yzp7tlHIEoFhA52BfYXJfna2 RxHw== X-Forwarded-Encrypted: i=1; AJvYcCXom59NK50NLsJBQe9TkB8LERB4aP6gGeH/UlX8ESJqgtWdhcvHxWoW9FRM/zDX5Kf8X40A7Fk=@dpdk.org X-Gm-Message-State: AOJu0YyzDaX+ZgDCckEut/aRt4ZIoWb9WG9eWIleiFXEdwC3IFfVEoeo u+J+Yx48bbvg9HeTXoC1u9K/92oM0J6zlbHTLyqv5mbqddBh/89Xjxkq2Epkig4= 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: 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 --- 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