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 2ACBE45A5D for ; Sun, 29 Sep 2024 17:41:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 17AA740609; Sun, 29 Sep 2024 17:41:25 +0200 (CEST) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mails.dpdk.org (Postfix) with ESMTP id E9C5340273 for ; Sun, 29 Sep 2024 17:41:20 +0200 (CEST) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-7198cb6bb02so2601392b3a.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=AGrHxnzwAmtjOhGWHn517lzdUit56Z0nN4aJ4E1OtKdfZC9kqLGzahYZgxBliz8yCL CblI/cS+EWsa8pEzUrKDmD6HbTEVEHBHO05bPUrbODzUXZZ6U9CjhehfZp6C5uxyfZjE VAog42lNLAATvm4jT9j/gn5dkgR0Pc2nOQMbpwf4JjVQpE+NzPK+H6lv+GYsZyUzRq8v z2rVDsJrdSLGPoKJNLEh2F/HRNkEUrAbXSpd4+5twgVT2k7Ot6lsQ1W4m77076Mtbo8f Cw5oeJKis6QemgXRRZ7aoyx/hxMMfpfZc97z1/ocRtu5na2uaM3dRnbS4EE0dKN/YIlg aplg== X-Forwarded-Encrypted: i=1; AJvYcCXrgFCEbvu6DNZflOvZZmGX8qilpSbS1+BVYec2TnytWJc32DmVYkrRcvI1zNCbE0KsKyBNcZ8=@dpdk.org X-Gm-Message-State: AOJu0YxnrU4JypMnrhr7jozz5Y7OhgfbdplHMCTduPRBMqu6y70PuoDY hzLcLsCZcHwNZGLddkQIdybQ1cyFWRzPODOkzGGJ6oFlmbcjE0Fq5pPLEs1ctKc= 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: 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: 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