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 6B81545A6D for ; Mon, 30 Sep 2024 20:46:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2AED9406B4; Mon, 30 Sep 2024 20:46:23 +0200 (CEST) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mails.dpdk.org (Postfix) with ESMTP id 1CAA84014F for ; Mon, 30 Sep 2024 20:46:15 +0200 (CEST) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-718e9c8bd83so3978435b3a.1 for ; Mon, 30 Sep 2024 11:46:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727721974; x=1728326774; 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=S5gM4O39CYS7XzI3MZ+De2ffOqY5smarqIknSUAMO34N0vDY3BtaV3OgLy4yFivljZ du0hWwKtxrx+y42EbKxEOHGsyKS5lwhqCdVfYAtArxB2n1hE5GD4YmfRF93CVBeJV3Q5 eD4CiumZ8T+wKi8TU2BiMzXoJ2H766Set8EuEUMQXNlpoMSfy5cYcka9nosv1OHRhg2q SVvipV2Ivo4Svk3B3wPjDJzp13FIdQ+0Pqg4stOJpd6cRRZzDb4Z47u63DfUxy6e8ndH sbMXqyVml0QrF+LHLiAhaa6R8ZaNWJqFaMVvkqAuETTtrAetmlXk4ZsI5drU5Jb6KwfF 5y6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727721974; x=1728326774; 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=RvjSUqxSYb4fwqqdJlTCNVRIzm5nkDv76w8wC/RMCLH4vvqmW7kOzF4D8fRkUYnm4y QFUJBIWF19fVPWV0MCFi7iXluUpNlQouFk6/4LzrUOaUbUSckW5SN4cwAFHmK+BJerGj P0b8ztdwd9yfqwfUDyD41LxKhmjok54fL/N6OAKwON8GS3OmMqNJirUt17S9TL0TYD3G A7nBRqt5vC1KLG43QdknSEqCgyO6zSi6bw3aUTMTLV/7yB9cD+jSAy9xhLjBH9E7KWGk OJ93T+5UPDdDuteyhGa9VMb2kjPh2ZFYPz/Mel2xcdUw0xElmc467jst0b3yp1lplFX6 yUJA== X-Forwarded-Encrypted: i=1; AJvYcCWoWmd7oyGrPUU0XjnOROP4GOABvAZ3V5BltGDcF1c4BaFPeNlPUZdIn9b01EavD7aV82N2RZQ=@dpdk.org X-Gm-Message-State: AOJu0YwJBFuCAzWUR0eblRfmaM7E7TfyF04holObFQ2I9yLrMP0JYiue Xbz52Q5baxqlN1+4TtOxmDiTi88g0uWyZzSslSSaUvZdqpJFyX1zx+87b5sjbW8= X-Google-Smtp-Source: AGHT+IHOzTfcs0RqINwArHLEobg3Sk3Tbv1xdfH/V7etmzPOKUsdR9FJWYtbgV2ak6AqTYokzjLXVg== X-Received: by 2002:a05:6a20:2513:b0:1d4:e40b:8990 with SMTP id adf61e73a8af0-1d52d0c43d0mr809031637.1.1727721974308; Mon, 30 Sep 2024 11:46:14 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71b264bcca6sm6581895b3a.78.2024.09.30.11.46.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 11:46:13 -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 v4 05/17] examples/vhost: fix free function mismatch Date: Mon, 30 Sep 2024 11:43:59 -0700 Message-ID: <20240930184600.7092-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240930184600.7092-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20240930184600.7092-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