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 1471545A7E for ; Tue, 1 Oct 2024 18:37:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5CC194068A; Tue, 1 Oct 2024 18:37:29 +0200 (CEST) Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by mails.dpdk.org (Postfix) with ESMTP id A473240612 for ; Tue, 1 Oct 2024 18:37:23 +0200 (CEST) Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-7db637d1e4eso4483742a12.2 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=fuxumROlDCoxDQRrvrLBiLGQrmoe5+LfM1WnS1kGrrhPfCreW9ZwmY0TZHmrIBT2t5 2b13AyNdxjakxxT8EefUX3RXKCEdgu5OD33iQpCLr1QPSonnzz3UTKoYAcaS/UnmfMe4 sGFyG2in1p5boNlb/xgTCkan0VixzcftT1+Rqv8kkbd8K4RMnO5fAhoG1cXjLl2rU8uM jixuwPaXvi9Se2+wGL+eyGMQHrQ166WOpHqa7JVh5oHWcHiCJnmk492Qz/GTdOXyJ6tM DgdblLb+xZO0RvqqdLafrTqcNITTU8aQb6KzC7wy5hbrJXcChY0WNaZde7BC138bS6j9 gKwg== X-Forwarded-Encrypted: i=1; AJvYcCXmxcYW3Yx+27U1J8R9xQDcHVhBhVznjdOHet71G+p6aP5hc1l89z1HPCYqiiflpzZnSj2pTvo=@dpdk.org X-Gm-Message-State: AOJu0YyIKCpwxKrOQw1dhfX/8ofIfi+KOVi6Onjh3CRXdvd6OxT+KXSk 3XeW7KpxluFdyNYLpUa4y5NfnXT6HwVjr6g81Q+sZ8ZBjZmI9PtjoSXW622dl5E= 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: 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: 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