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 2F9C045A50; Sat, 28 Sep 2024 18:49:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A029040662; Sat, 28 Sep 2024 18:48:37 +0200 (CEST) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mails.dpdk.org (Postfix) with ESMTP id 00CA7402F1 for ; Sat, 28 Sep 2024 18:48:30 +0200 (CEST) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-2068a7c9286so33703685ad.1 for ; Sat, 28 Sep 2024 09:48:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727542110; x=1728146910; 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=L0pZppOAl+rmoX1l2Zb+bcSFTvauQ0P1mGfs1Bt5COucP+rxO2ZjB+YAsVRWOKp0Ha ElcfMVNfohJPWW1Q8q71k5USnFWP0iAXbecNXFw6EwxGiokQGvORDzONaAQuTmaULnct c21Tx74TfjKEILlHz0gLd2iEE3EOWjjmPPUIAzUxsr375avdbo8LLB5YGl/wtv3LPnSB 60Vckx/lc+bAVjxPpeHty86eY2kvK8447m0TboOR1tChJMUHUfeXytFz4mFTfewWgiOF MKhtABRsEGBc+jEpPp/E1iWiu9xB8nKF2D1GEzf1DLRy1l4pEa2j9qJCZ7dpHOYDp1WY 9imA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727542110; x=1728146910; 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=MGKpLUhbQyODY9kAX2J8Cma7Cgd23YSe62TSwG9cDTmdy8Z7PghSyZ+del4C4l5RW4 nPTa58m6AdaO9/mQxVPZeYPyHxtdFUqrtjTy2bqFiHyW1GzSOwOTkzhfbgmU57FxNBAf GSKXyoJlIfss+x8CjPx4OeQzSg1UKwrJflUUvA7DqNcIYpfc9U/8gQcpUyYkQrt03uFt o6mtdS4FyaU98a6iTvAFMqzYCAbZFMugKO0EPUWuwgRV3H3jCZKE3HS/+wE08qHJO6Kt wJmd5Rft1TRu6/ErSimH/ZsLYSYnFNR+8z3FMRGE6JfCd3tOn2pJr2q4/v3u33IgFU4u /A8g== X-Gm-Message-State: AOJu0YzznBtYESnK6SRWmy9J9lyqsTX4eEwJhjCntQC8+0Og+9q+umP0 +dtWrKb6eOZjgj3RmqeYuiDElF3ZtnYwcN57dPedp9HqVOl6Oxy2h/At7mP1g02Y5oG0VN8ICcK r X-Google-Smtp-Source: AGHT+IEbuIYIYY6PPWvEia46YJD4FitoSCFSi3zwpTUIwhibSLcnD8OTrFHu/v+tc/yDIyyH0LVZgw== X-Received: by 2002:a17:903:3283:b0:205:4885:235e with SMTP id d9443c01a7336-20b37bb79ddmr82339105ad.39.1727542110167; Sat, 28 Sep 2024 09:48:30 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20b37e47c7dsm28854015ad.216.2024.09.28.09.48.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Sep 2024 09:48:29 -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 v2 06/16] examples/vhost: fix free function mismatch Date: Sat, 28 Sep 2024 09:47:14 -0700 Message-ID: <20240928164814.861933-7-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240928164814.861933-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20240928164814.861933-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