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 2A34645A7E for ; Tue, 1 Oct 2024 18:37:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20D2C40616; Tue, 1 Oct 2024 18:37:26 +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 2DAA040299 for ; Tue, 1 Oct 2024 18:37:21 +0200 (CEST) Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-71b20ffd809so4326422b3a.0 for ; Tue, 01 Oct 2024 09:37:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727800640; x=1728405440; 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=akXGciPiPA7i8qgIxWJi4Qw/Kosl1qeoxb5d4FG1Tf1DhhQ77GdV0Rnc/mj+uRjG9N +lCuSY8BUuF6k4pJ6pZWA1EmQzkAzOiQEGG6dE8Kiman5BwwtYyP8PKLuMKxFfTRKbTz SPB9UMJhc8i13C4GSEL+SswG6mGT/vmQrRehwIDKlQ3o8yTOwUJIGCwElhT+WU/sC3Gk dCYn2e4etpMTQIPiAQVhco2YMU5gzv9s6Mr7v1etTa2Bd85cntPjdBxbbNWFYcPOFDHm x/uXtXCwunUTAD9lfTEttJWl/Dn55SJvQaaWk9yZ0YbRk2nbWwlcGW1ouXPgQ5KRI1PX a6cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727800640; x=1728405440; 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=mW0Rj+heDmx30NqfY1jwmaxg6MoRQnmr+BU9Qd3XODLEUSkn4ZnJqRYklJp5DS2J/a VRHBmx9xO810RXS6sCUz1yvZBBrVy+tS1b2jxsoKF7QezRP4ktfa1x/MU+NnzLlkuFgD 6xMjUXUc/WiS0IQIqJ5XrBVDU0Lc4joTxZ2BX9tYnPrjj6zv+2wJGSv17Ri9YN7omwi8 cNyTHXGpdV8GZeTqdhOsMg6FKMv9W0kWn59Jk9qmtScVtZjV6s2nsujWees5nLks+7Db szuRLGCVsYKKhGERaWVrbNbX3FifOeth9nIgDD+c2uUEh+Z25KFosFrwv1nGUkRzXjz0 iTNg== X-Forwarded-Encrypted: i=1; AJvYcCUhRz5+jg5KVB/E5yG0cBR5DNQMICkfnHNxagszRNGT/9k5Fp+Dm9tThx97ne0GpZKlqrsIEgI=@dpdk.org X-Gm-Message-State: AOJu0YzTOcqLBbaOv+WKfgBrA+BaFLzbnNY4i5Gh9NnV94aKz1c7ZtNo MT/nHVshJVNqa/8IxZ/FrVFKMWfr8clTK6T6FmKHMLhyRaCriD2tPy6sKAeJg44= X-Google-Smtp-Source: AGHT+IG2D+fEfU8TdQN7SvXxN4NINM4Gr8ARO5cZ+jbI16LNTDE//qDtgXo2wwsFkU7ubP57EkSINg== X-Received: by 2002:a05:6a00:2188:b0:71c:5e3d:594 with SMTP id d2e1a72fcca58-71dc5c6713cmr455982b3a.10.1727800640377; Tue, 01 Oct 2024 09:37:20 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71b26518818sm8213565b3a.129.2024.10.01.09.37.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 09:37:20 -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 v5 02/17] cryptodev/bcmfs: fix mis-matched free Date: Tue, 1 Oct 2024 09:35:25 -0700 Message-ID: <20241001163708.355128-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241001163708.355128-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20241001163708.355128-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