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 6637045A48; Fri, 27 Sep 2024 22:48:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5277640609; Fri, 27 Sep 2024 22:48:03 +0200 (CEST) Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by mails.dpdk.org (Postfix) with ESMTP id C41C940294 for ; Fri, 27 Sep 2024 22:47:59 +0200 (CEST) Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-656d8b346d2so1688581a12.2 for ; Fri, 27 Sep 2024 13:47:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727470079; x=1728074879; 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=LtIHyXMTHZ2auKgh2I5YcGq0E8hZToskbF6BYOcEe45oAeTujK7Kud+qa1vYpgtFBJ 7jXAcKMjIvpCtUg+oOLr4lqEWnZmWnoBTcaMbyRI271zWZ2ykGSTPwQr+P9OTwVhX4jk 1DShKqsbruwOdRtS2vRSX3yEmGH0fGlm8N+yG/Ca78OmoPVUchCLjcHRiU/dpxAF5wMg mUdb03g4le6GvksL0ptYkXCGoi//TZdpJMarvF6GfZhHvkzaJ8VRMC9EJSpva3MjXWoj c5tA+h4Rp4bKiI8oEfcrS7ErszAHjLz+ttbCYrGZm5UumwG2OtviZT4f0VdKQxx3/E5K yg7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727470079; x=1728074879; 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=dSCu3I6aOyhhUp3yr0TkDxkl9lzqPEATosuzk5PhD0tgBWXLfF+nyxetQPqMKdFVMe PuaFhziaj6CY4UoZDpYt7XkH7h6zyNpFhDbcCqR/N3J46n2M2pFxTKOoA9lhOdn+mot6 PIi7I7oiPyR6flyyIeb/hAsLTK1JG9bZGaJtv2N6W3wPCS7IV3ACXukXktU3qoYA97Bb qf/KoYIyB4F30oIO8zrksDvRKCuxR0AKsZ7uEptB5KHtbWxNyOqLs2IGfKqeqWLCk0Cj Q+Jd2BQB1V581DD9qK85lyh+Z4fXg2ku2k3x6UcJRpVCZCd2BUyR6THcpKQcIDS2RECb SyRg== X-Gm-Message-State: AOJu0YwU2u3rz+9hCr3PEj2Q117ge19PwvS6pbhEY4EGofM5X82HtgIP pKxg0jGsJTwj6PCY5TKkRmLaYiT0xecVEi8DGwZCOyfmQ/z8zvFKAE2jSGRLelkvwWP0zk+sYhb E X-Google-Smtp-Source: AGHT+IEk+Ykv5GTpulpbj848zg/OKbcD7kVeAwPMSVdlGczUNkp3eeFgcEcPby0HR0OWDNQsZXyCWw== X-Received: by 2002:a05:6a20:9d8f:b0:1d2:bc8f:5eb6 with SMTP id adf61e73a8af0-1d4fa7fe057mr7158114637.44.1727470078891; Fri, 27 Sep 2024 13:47:58 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7e6db294533sm2036531a12.12.2024.09.27.13.47.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Sep 2024 13:47:58 -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 03/16] cryptodev/bcmfs: fix mis-matched free Date: Fri, 27 Sep 2024 13:45:39 -0700 Message-ID: <20240927204742.546164-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240927204742.546164-1-stephen@networkplumber.org> References: <20240927204742.546164-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: 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