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 8E46845A7E; Tue, 1 Oct 2024 18:37:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8250A40695; Tue, 1 Oct 2024 18:37:29 +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 AA5DB40652 for ; Tue, 1 Oct 2024 18:37:23 +0200 (CEST) Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-7e9ad969a4fso328973a12.3 for ; Tue, 01 Oct 2024 09:37:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727800643; x=1728405443; 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=NKlsSE/ils/BNwzrbn82mcXaZhpj81/i4C0+pjHpynM=; b=qls34TQ+ocoS7QloFhOq5V/bHwSemsBzJ6HFIe784L/jQKBzYRnegJKiO/VC8J5aHB VlCpSkOoN6TB20nA63XcLfK88dszRQ/OzI1lXO9Q7QUOUPp/ARzSjX570ShI/aBHWPBO xSThYRA0w0PVy8R31BdYVP9c28KNDjop/O61aYl7Tjf8bXKIP4OTFxbXWpVx4D9Wrtda XAHD2grKZs7rrSOym8nTFSKRc31NjQXsrKZVoFiErKFnBVSoUP7e+HRG+99resvCuAtQ Tlyzc3tyaivX9AuKZdukq/jRV12pgRjKGVsKj+juHOOB89WG+R++NFcaWlsq4yiRBYVH 2Wgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727800643; x=1728405443; 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=NKlsSE/ils/BNwzrbn82mcXaZhpj81/i4C0+pjHpynM=; b=eZyYiP1Oo/jv88nWi0X6tRV6XFiIokpAL8xogaVm9Y1BveOijA13lnnl/lMmQx0gsh dGw/CYSm/SsSvRHa2r4poCuqNqKzHv1vk2xPxGp0yE9u/mfsmh7LJcwEtT1moL4t2zDf wXJpJQ3otWI4USdqdwUPowLfobM482SjIAbU8DwI9z83yEv7Gl8WPGVhEZlOZeqPkRZS HwVUd8NdIbpeRnaiqaNpRedUBXl1s2qQ9gdrcdKD9k1jJrBnpLIaUuA8tSGUnthMhual OZDmF56xaTrE9zTHHHgE0/XYny4dwCAS54xro4+K+uF6kRpBQUvmaUvXMjFu6LQ38LqV bq4g== X-Gm-Message-State: AOJu0YxqWoMhjXFC5TNmB+Ja9I5lQWLxFqZxxzfZoctVwYMNtEHH1qFl 2BimlAMaITvWE2beWRMUQNH5c00llUpaQEr7D7vLm3iVi1crfD9QqxOWXUoI9U+tG8TW79OZy31 qEXw= X-Google-Smtp-Source: AGHT+IEdcV6Wr1KHBSijfse7yiPrOCGd20lens8X4cGCQKWntrB25de6QpIT56Z9TxFulN5KwPjvow== X-Received: by 2002:a05:6a21:114d:b0:1cf:4d21:f4c1 with SMTP id adf61e73a8af0-1d5db128683mr510037637.19.1727800642869; Tue, 01 Oct 2024 09:37: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-71b26518818sm8213565b3a.129.2024.10.01.09.37.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 09:37:22 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , stable@dpdk.org, Chengwen Feng , Maxime Coquelin , Chenbo Xia , Jin Yu Subject: [PATCH v5 05/17] examples/vhost: fix free function mismatch Date: Tue, 1 Oct 2024 09:35:28 -0700 Message-ID: <20241001163708.355128-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241001163708.355128-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20241001163708.355128-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: stable@dpdk.org Signed-off-by: Stephen Hemminger Acked-by: Chengwen Feng --- 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