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 7A68645AE3; Tue, 8 Oct 2024 18:49:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 21C8940E3E; Tue, 8 Oct 2024 18:49:04 +0200 (CEST) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id EB51040BA2 for ; Tue, 8 Oct 2024 18:48:57 +0200 (CEST) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-20b95359440so50482435ad.0 for ; Tue, 08 Oct 2024 09:48:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728406137; x=1729010937; 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=g8RhIesTWtrpBnXExt6FRINVc8C7RRLGgCeI1HNArjKPs/Y3nte1a+6Eecq+xwgAGV JNNjQ6yaN0QlwQDo1Df9c0w2TMrqHxsSkaMON+DL4CNBSkEk/u4SzFLyV7iR0qqGX6I0 u4hyxvcUkdxdydN9jjXeMuZsEQUKDADaQeDYYI6KTC4GEBcUDPycIb1sr/i+xCL2I7TP iaVZ7ydX6FLzAir/dacIY0Kb7GfqaadgRBDK6WbGTF4ggSRBGHtaf5DO3NW21GNbNmNn BvdO3++CHvMvWVVBvvGh7+sAMxf3eCsjid/M8dfsQfFMRfnPaFOQCGC2YIamkaOkyvAY wdkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728406137; x=1729010937; 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=c7JfpDvLgM66I0rSoNmriUFUM0pypNjZZVq4T1HpkkrCd8bbjb21YuW5/vlzQRuA63 2uIEPv5zWoh9IcJXmIpFehkMvqO5p6LWNJUqGT+pxLLeQ8KEITasdcboQooskLkd9tAt cy0FZXjRnwRyfCxuXWuOmyJ+PL4o87ic/5XDsOIzK6PRcdsxTdpJ2x6FthxmmSZU5f09 baG88sJwuapWRYkK41rKmcfQIcsOk0xDTvlQz2D3DMlTyWjL9wuSRzgs/W6caNLaqV2E gItmR0TwUZsZCKaa2n/9QPyBxIwmsvengHSV1O4IPtWnHplxYUGirx7oRyHw21Se+yPK vs2Q== X-Gm-Message-State: AOJu0YwoEPcMBpsbD52gwOKBvrfWKJBQR/oTcm7DqC+nGN++MHTITdIq W/6pGujochtLWAs1k4mxBMlibZ5Cyzq3/HEiG6URIbiNWSwsIhChDwAsHVuzXoXEdtYG+Kgs4He laUNSGA== X-Google-Smtp-Source: AGHT+IET2iir6da7pJ/xyUdsR0rbukbu8V54lyP8rYc/LarXZGHkORnFX4BqFnF5mfjHk0MZDdyqEg== X-Received: by 2002:a17:903:2447:b0:20b:bdbf:da82 with SMTP id d9443c01a7336-20bfde554famr260564305ad.9.1728406137112; Tue, 08 Oct 2024 09:48:57 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20c54056bd9sm13832965ad.85.2024.10.08.09.48.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 09:48:56 -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 v9 05/17] examples/vhost: fix free function mismatch Date: Tue, 8 Oct 2024 09:47:09 -0700 Message-ID: <20241008164842.139045-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241008164842.139045-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20241008164842.139045-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