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 85B4445A5D; Sun, 29 Sep 2024 17:41:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BF10D402F0; Sun, 29 Sep 2024 17:41:23 +0200 (CEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id E133C400D5 for ; Sun, 29 Sep 2024 17:41:20 +0200 (CEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-7198cb6bb02so2601391b3a.3 for ; Sun, 29 Sep 2024 08:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727624480; x=1728229280; 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=+uckk3A2T0RVoEqWLKfrixwgNlD/fYVq6Jxqm7vdAyU=; b=vZ7DXGaI5uNb7Hy0qHHDwxz0CSyTXFSWgrAeAjY4j4lvZ2Rm36iaX8Hx39Rb/1MUQC x6ZV1Etes5D/5lpfImu/w/fqTLHt39NX48V8jY1VZTI5RZgFEODMWOYtvxXuoRxQXPc5 w2RbIgM/t6A2JBNMtLr+hYIdkaMJYmFrtJp7IHo0VxutizMigZ1xzYoO8+wFqRXhZ11V YwabBIkheBRfO5DS5i75XsOxHS92EfbMGPFYIADHd7wTLf+t2HLl0gHypV68bCzRaji2 esBqmLLJydv05b9J9qYOcNSH65MqG6Kx26wRLNpr20dtPLbcglX7m+MTCXU18+UgRgXX bAmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727624480; x=1728229280; 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=+uckk3A2T0RVoEqWLKfrixwgNlD/fYVq6Jxqm7vdAyU=; b=v5BShY6WJd9mp7Cg8yEYejR5RtbvNHZusuEy8isGtLltrg3mXLkaB9JkIjQ7uD1SHj hGYRZFXV3gdDtDOSF6+1iYJ5RcCaOq+yCuD9MKH8xneqpgYrUdEbHJmfEt+QfcyV9ZjL ptPMA/X3xipVJBaEmWR5/qXINgRy579ABdm9xt2IPc3GBpYp044JcKujMz9t8FLA7xYA M05oVYGtkTfBarlSXB5hQwP9YDdwlU6KJ6a9RSC04N5PjnnjRhCYpVM7GnEjFfubwf53 fG1tUf4rzr1JYMdbcf6yqQ3+2qgaNKfh3I5eLkxuDD2xCDgZi+vbwqmgVukuxFrLGB4E OFOQ== X-Gm-Message-State: AOJu0YzoxGCQ+LGg4XKOO3iJgavqkXFYIYKHqObTfwNBWSQaPSr3qWpn sHgpJgcgS7UQmHn9yDrF2PqiVLzvaJzHhW7HLPcIr1a1ja1JrzT6wNVeDmnI/SX/uc9vfBvqq+f wiU4= X-Google-Smtp-Source: AGHT+IFftVCmSfJVSSJcXwo+0OqgzWdPvoDfIgGHATFFy0fzwM0cLG5Tw5jFxQaPt5qgA7qtoBCJ5g== X-Received: by 2002:a05:6a21:78d:b0:1cf:440a:d756 with SMTP id adf61e73a8af0-1d4fa7a6febmr14861982637.40.1727624480089; Sun, 29 Sep 2024 08:41: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-71b2649c775sm4707416b3a.29.2024.09.29.08.41.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Sep 2024 08:41:19 -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 v3 02/18] cryptodev/bcmfs: fix mis-matched free Date: Sun, 29 Sep 2024 08:34:27 -0700 Message-ID: <20240929154107.62539-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240929154107.62539-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20240929154107.62539-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