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 CC6C545A5D; Sun, 29 Sep 2024 17:41:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7ED4840657; Sun, 29 Sep 2024 17:41:29 +0200 (CEST) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mails.dpdk.org (Postfix) with ESMTP id 9D87F402DA for ; Sun, 29 Sep 2024 17:41:23 +0200 (CEST) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-71b8d10e990so1336225b3a.3 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=U35NLZa/abKSc6z9hGUZ4HhGWuZrac3r2/o4apdh+qcmEw/QtBucN8t0CZhjGlR3j2 hBgwJ9gjtLpRrJZ35H/5SttDXueCH+x5I809JdrHSDSiqkSXU4FN90QtorMLyMOSIT5E NJC8bmgXNSLLcHeaLmCihGqaXDssLSiwccQWRQ91lFJrsjlVo2bYinnv2S5kBkVjbPUc H8K/mA7j1/K7oT0zHsDi/rufTA/8vaMDD5Ku7ueFbFuM8KMkGY461y3wnCxPNawEiItu 0pk2JvtQfYSojV/w/5+G24Bqj9DKsMbO8dS2f9grOw3m1F0qn8/GOqKBxbJpp+E5PsHF LLew== X-Gm-Message-State: AOJu0Yz4bZuhxskto7a2AOhl0SDr+/JR2psb4b9Ue2bo81gmVeFum/Yq +28mQvzkIzsBNplQpuiEWEGoyWrqt+OvnPOqUuXMJfbYooZRdCIlKiE2W3/+abto+DcaanlHCnw 3YnE= 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: 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 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