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 71D1B45A7E; Tue, 1 Oct 2024 18:37:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 63F8740612; Tue, 1 Oct 2024 18:37:24 +0200 (CEST) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mails.dpdk.org (Postfix) with ESMTP id 2DFCA402BD for ; Tue, 1 Oct 2024 18:37:21 +0200 (CEST) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-719ba0654f9so4875839b3a.3 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=VbVTxhzB5+Pe4Iqjy6ZdLc4I/69W3SL617a0UkHO299X8huf+H8b6nDqgWxi8UcG8J 9VLlj6g/3I8xVF9hc1PheZm8x/nQR7R/7EU82zzrUVRlT7qlzLe8rmwOXEKQrbyLBQZi sAF+127QfSZGBNEcmyX24Vb2vkUzp1LRfilvJCvGUQzHth9mxxtaK2RR5XsOLosyG14r TK9pKQ5gS5ugPfSJDaZZbNnCvVnJovFWkgXl2AQd69BK6aVENsK1R8Hfn+8f38Ln7mv9 8Ql6QogmoWN4Sdcenddx7v3F4YoCkM6MKp3uuT1m+sujjCdsQ32D5RPIDzlUYcFd/oKz /36w== X-Gm-Message-State: AOJu0YwpIT9bh8Vk1/31gLzAu49ug1O64WZSicIh/kyXrjGMomlTlr01 desULXiHl0RHvYBP8dmYhhE3nD6w5V6g+0396wxuoI/nTydmTkk6VtgR5DTWOA0UQfQMNJ7LcSZ HBSc= 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: 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