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 3E5E345A5D for ; 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 4B0C740652; Sun, 29 Sep 2024 17:41:29 +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 9C528402D4 for ; Sun, 29 Sep 2024 17:41:23 +0200 (CEST) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-719b17b2da1so2589298b3a.0 for ; Sun, 29 Sep 2024 08:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727624483; x=1728229283; 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=qX5JnPmSsf+JiqhomIoZSRVblyTHeI0U9/zFsuxKGzU=; b=WaWZGQXWZCgYrhkxKwaVwTqCF1H1qph7BmVA+AidIQXlRoXpkgSaBCJUVQtafUcEC/ PLlmt/RQWtx5awsGugUigc6pP5+99Pu4b2+m1Bnat57h5GJD5+XtK1LJXPIj5Jl9Ht5/ fLaAVUfy38U5oajFf9rzohGsNXe0ura0wDyMvipmewyk/fpfXZlcTq88VEVyEj395A3D wOyf9bx2OAdN3FRzime+mXinV1mwEhp//mYTP+xsUN0BG6VkEuUKpgKG0H/WV3sACUj/ Xm+Scai058SoS4xRN/UZ/+buuMV8RRJw+7TYaMgeMG5iLiOSDfKc0Y5CCNaN0FKZ7F89 8Jpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727624483; x=1728229283; 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=qX5JnPmSsf+JiqhomIoZSRVblyTHeI0U9/zFsuxKGzU=; b=TbcRTthtJDEFD8tReIWAY3KK/3CHVlq636p5kzf2E16LFrBcIVxljYXRWaz3vshsF4 KpwQoFRVxLX1RRhQQMKS8MVxaMOp9dx9K/wsuM3U+ygo2/N2ccaPE/Yo7swdiPsCF2c9 BzA2AW/oEDNq1jryaOMPudFFRG2QpApGw5c9+1EqME/RUXlVHO28RHbpBxptX042We+T cF4wQoGC79uecuzbTU+rNEDKOYiYBVlNMFyEh7tK0k4Y9JcmKZky+cEpfpktnphzZkCA fb3DmUFSsLzHBVSFYAVk9w/gt49PX5x8zf1u9dTrvsaRI/bC0b1Sz3xDlLe3GS7eZqFg +8YA== X-Forwarded-Encrypted: i=1; AJvYcCXiPLZky50/cByJP1Xi9qTFeuWuJZJ/RpbQce2GDYAYo1FsRSaK7HcN0yMsPgJF4rpkAXZLzrY=@dpdk.org X-Gm-Message-State: AOJu0YwdaUZuLU8OBswV6fEtYFcu2TcDfYlQ2MCwcxYIMfXFWSTyZtY/ nyoA/KRD92gRWcB4W1kyMQhzfIQ6xbbNwdzlMwwQEH63KkTxg6zt/MxlxB4amaM= X-Google-Smtp-Source: AGHT+IHRiL/cc/VMWbOu5oHdUapMAm3KaASwPQDWX038tXCfOe0iCBxTeDTCg6UyEvXmzxaJzojr1g== X-Received: by 2002:a05:6a00:c88:b0:710:6e83:cd5e with SMTP id d2e1a72fcca58-71b25da6fb2mr17035164b3a.0.1727624482780; Sun, 29 Sep 2024 08:41:22 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Sep 2024 08:41:22 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , jin.yu@intel.com, stable@dpdk.org, Maxime Coquelin , Chenbo Xia Subject: [PATCH v3 05/18] examples/vhost: fix free function mismatch Date: Sun, 29 Sep 2024 08:34:30 -0700 Message-ID: <20240929154107.62539-6-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 pointer bdev is allocated with rte_zmalloc() and then incorrectly freed with free() which will lead pool corruption. Bugzilla ID: 1553 Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample") Cc: jin.yu@intel.com Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger --- examples/vhost_blk/vhost_blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c index 03f1ac9c3f..9c9e326949 100644 --- a/examples/vhost_blk/vhost_blk.c +++ b/examples/vhost_blk/vhost_blk.c @@ -776,7 +776,7 @@ vhost_blk_bdev_construct(const char *bdev_name, bdev->data = rte_zmalloc(NULL, blk_cnt * blk_size, 0); if (!bdev->data) { fprintf(stderr, "No enough reserved huge memory for disk\n"); - free(bdev); + rte_free(bdev); return NULL; } -- 2.45.2