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 9707945A9D for ; Wed, 2 Oct 2024 17:44:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 827E740615; Wed, 2 Oct 2024 17:44:44 +0200 (CEST) Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) by mails.dpdk.org (Postfix) with ESMTP id 7DB53402A7 for ; Wed, 2 Oct 2024 17:44:41 +0200 (CEST) Received: by mail-il1-f176.google.com with SMTP id e9e14a558f8ab-3a0cad8a0a5so34814085ab.1 for ; Wed, 02 Oct 2024 08:44:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727883881; x=1728488681; 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=c4j7jFtsT/tKG+Q2xCgVkBnjmgQ5D501zW1twm+qAapmXTvh5gTTg6AzKYp45MaNn1 hZCka3mwMMZWYmEAsqE0EGZgCJ16IFHdBjwh1vlXxxuYBcHqfZuMeCfwuzYULrwN8nQG KU/rpffz2U+HQlenvNGo2LiGTbhht2zGSGKj0Ptl/F93MF+8nd8Cpea8UZC/en3+NLhX MD4OVS/3Tq1+NWPrU+Fxs5edVIZ8HGN5NYi+C0HxlI1q/eIZqf6yTZ10o1Qb5Slop/Hy rfMdcyGRfF7L0jdyIsmeeEKBLoKHuUlgrpkdnwmdR8EC+IlSaiJ8ZT6jrSyqiXKiOggj oc+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727883881; x=1728488681; 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=DOqGPjWDL3mB5FOt50BU5/ECvGfpzGgdKhdEKPimNdUgPIHshKwEV73NK5Lwi1WNdN xNsgZUtoIW5Cvbx42F4dCM1iRK2Gf4+My/+C2lR4x4PotPd2NqeO6RUU7KWkdRufpxNf PbYwwt6u7JEZHT2IgjPZHhJRp86Cu0SU9BLNU2+jP9/GkWSfV0hAr7eW7V1R/MNOIppb K+trwgB9/w3mxN9DD+pCQIqFj+v4/sGfNj6a2692zluk+qk3+5YQmhX7V4WibbmpdhiJ V6k5plUGGIr2p0BnD6xVLYEQpyUV8aoCbL/ZFKZN3G0CT8Gpw/G3WOVrn0wM1sJcqNw7 ZtAA== X-Forwarded-Encrypted: i=1; AJvYcCXcgIaJidUivZwJ64OpU8mtc356yGkavEm714u3HVOo9IaQmWPH2r5uVWREUQyVcB6vNNUN2us=@dpdk.org X-Gm-Message-State: AOJu0YwZCkHIbwtNaFuyL/VdeEl/mFV75x0x7VasH/DheZejcLMykpIT FNAwbumNAfv026bP344zWmD5spKWyCf390HL0Gcx/uVlan/mEXccWn2LzQv5ebs= X-Google-Smtp-Source: AGHT+IFmqEaEld0ixlW1A9nSKqk947ypRwTQ0dTjsV3OBFyNZWSdo+TMDfg8eSuFQ1XDBRO21KMpmw== X-Received: by 2002:a05:6e02:1d13:b0:3a0:909c:812d with SMTP id e9e14a558f8ab-3a36592cf12mr40006315ab.11.1727883880740; Wed, 02 Oct 2024 08:44:40 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7e6db2927c7sm10247363a12.1.2024.10.02.08.44.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Oct 2024 08:44:40 -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 v6 02/17] cryptodev/bcmfs: fix mis-matched free Date: Wed, 2 Oct 2024 08:42:46 -0700 Message-ID: <20241002154429.64357-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241002154429.64357-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20241002154429.64357-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