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 D9F7145A48 for ; Fri, 27 Sep 2024 22:48:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7AC5940616; Fri, 27 Sep 2024 22:48:04 +0200 (CEST) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mails.dpdk.org (Postfix) with ESMTP id BF09440269 for ; Fri, 27 Sep 2024 22:47:59 +0200 (CEST) Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-656d8b346d2so1688582a12.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=kUYtGXqEpB3OMcyhADz5lz2sTrXOw7mpQaqkoB3g5OfsO2M8MyWInSCTR/qpJCJXpo /zC3H7eswtoeZXdJ9n2nfvOUmVkzygIJAqRY0kqQuWds3opZ/LEq0cW8QQ3cIB/eB0D1 gUagx+a9ie1nsrArT8cUQrRuKmHcgHkuh/dfaAyM6OO/B/DfW67f1eoE9MlfRXHPvdAu 2odiGgj9k7bKCnZvHlY7Jf8JhBl56rblrx43mE7MLHeTxmT20id+RmrQQ3pTo3Sv9nI+ G9yuqw6Cf3N4gzzI06c5gBIaHPwlEpjQDPsqdyUhHOPKBerlmbIlRR+1rcujXAKMx0Q7 N7ng== X-Forwarded-Encrypted: i=1; AJvYcCUtbphd70dYDd7mFTZiXN30e84peD241l8Hd1LN53fQklunE5RgN4+/6Q+g1GtWL7lCUFVy64Q=@dpdk.org X-Gm-Message-State: AOJu0Ywxii1AIMbVbmNEK3zwhyhdnvJhgLYxwXkuwxoPV6AStDLRvdIu /BOS3aVlw6MwhzlCcCnpCcG2xsuWGoiuJCRmfXS0P2WEGDNs2gh9te8BpCqawzM= 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: 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