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 341C045A50 for ; Sat, 28 Sep 2024 18:48:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6BD474065E; Sat, 28 Sep 2024 18:48:37 +0200 (CEST) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id F337A402E9 for ; Sat, 28 Sep 2024 18:48:30 +0200 (CEST) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-20b1335e4e4so28885255ad.0 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=fkINVb/7hCv+YfbAReCJm7etCIDHU8fZ/AlsO0wJGD9q9SXgRvjYLbD9PpuwfneF0O XRTZOVaImY03lKrwOuY1VS1m2M52SHLX7M9INXZnga70xP/g2n3HCndM1oqFaGMvGZwU KuuswzqQnzv0fLkArka6SMTEDHJKIZfBa2cf4kaiPVyXcwzbN+bpe9hflYAJ1OWMEbrT B2jcxNFr+Q43sOIuL67c5mBqerfHXk8MLR0TQ5/QN4EIZ4qiRu3+njzbqnPQsgh8QRvH RyedExKtYE4vrAIoN/L/xa8kwURdIJXE09diX3rbH4ez/pw2bSTK20aXKrQNhdlX9Abf HesA== X-Forwarded-Encrypted: i=1; AJvYcCUaH+VgO6Sp8hJJf2qLWU+ayYorv/kJdCiIWq8KIR5mlGQeRgkgRmLitA5drtbYztIk5uiptk0=@dpdk.org X-Gm-Message-State: AOJu0YzE1tiv2WiWQWh1tu6p62YypxdJvcmDUpDt35KUrLmaEiRLo6dH K6o6Gx1v/oZzWQJy4XI5fmaafFXVkuaKpZ/zGdOHbENuYkXtsMwQtUARUswWDyE= 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: 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