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 C360645AE2; Tue, 8 Oct 2024 17:43:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E600640DF6; Tue, 8 Oct 2024 17:43:21 +0200 (CEST) Received: from mail-ot1-f47.google.com (mail-ot1-f47.google.com [209.85.210.47]) by mails.dpdk.org (Postfix) with ESMTP id 3A36B40A4B for ; Tue, 8 Oct 2024 17:43:17 +0200 (CEST) Received: by mail-ot1-f47.google.com with SMTP id 46e09a7af769-71116d8504bso3477244a34.3 for ; Tue, 08 Oct 2024 08:43:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728402196; x=1729006996; 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=rcnbRFs2u210YvJA9bNgK8GU/l8PFbPpar6hbhnzmqI/942vg4PloJUwMOPDm0VcgF T6pOQ62Kh3EEuSsZ4IT/e3c80vIPP7A6snVp7yc5e5VfnJVPQH3vXFDi/alpJ7F0m+c3 ZJ31GhMJM1vsZ4NvMxf6OMlDEdEL+douPzPdZrgTC69wFZHZ5MBK3wYy6+86WkXknOxa Hlih9AAvdlQU67zBOLgWowkbdvDn1P6lwMr5qNNZLhy8QP41oMIDgkSKsoCTNCzJTerH EwOhGunbm/2dZwURuYXQ0f+EmMojqeZNACbnPelO2prKqvY/YqX7QJH9f1Hiyo8S1zUt msPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728402196; x=1729006996; 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=XUeOIg7Clma0RyxIPIy6niUQ+opwRfpPDDArsmM/tdKSvGKC9Ixd8+zr5akjFc+aa8 4qfHVjdECWIxjZ8F62mtX7VG9iR4SeUnrL/jZcZU1NM8H3GA1nBBJQVDxd9pppBAt796 TUkXeM2mTtPbfMS1U9ocvN5kADhpLg5CkECiBZtWI65my1c/ZzeY1LUe4wHfzMyMg5/f FzRYqakZxq3ZGuEkaXRHHiGfcVexF5XWZRDwXfhvjNxZd4zxdlBFcIg4hH/q8995oVTk dh3dr5p/B3XHeMqbbKB1rlK4XHxMHX1Y4mJR9ce+E9SoTOolxqJsLcQ/UsMrnr2+4mwC X8kw== X-Gm-Message-State: AOJu0YwhThetgSytaIIoHBFOqYbBOd5yJGtA1JQzq1JOMwUo3wEguRRr VDPBOzyGxQ41G3zT+A52vLBQH3FnvRqrQ7kRXAWz1VMhe4CIK21v9KvmXba4bhvtuWIVj/BK/VE nfVqbqg== X-Google-Smtp-Source: AGHT+IHUG16VOw1k53g0gXcaX5c7I8SqgEapxLBykJJQJTLGx4vJPo39fYK5nKMZmzi9FTG9TvL0WQ== X-Received: by 2002:a05:6830:628d:b0:70f:6f05:6156 with SMTP id 46e09a7af769-7154e98fd0fmr11251979a34.28.1728402196574; Tue, 08 Oct 2024 08:43:16 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71df0ccf01dsm6293527b3a.70.2024.10.08.08.43.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 08:43:16 -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 v8 05/17] examples/vhost: fix free function mismatch Date: Tue, 8 Oct 2024 08:41:35 -0700 Message-ID: <20241008154301.66192-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241008154301.66192-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20241008154301.66192-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