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 B4B8E45BB6 for ; Wed, 23 Oct 2024 23:18:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE8E540261; Wed, 23 Oct 2024 23:18:09 +0200 (CEST) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id DC6C54326C for ; Wed, 23 Oct 2024 23:18:08 +0200 (CEST) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-43161e7bb25so1992675e9.2 for ; Wed, 23 Oct 2024 14:18:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729718288; x=1730323088; 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=Ro5RqAQqx8d+zminRr5BG8GspJEM/UgrambiU1969Zs=; b=kNh5LSBmP8NliCs4bhUjm2x5xcTsalAzSNc7oATmYShiReuZz4Eru0pLWbk/UX/ZgQ kkd1ExCR33HBjZTNQZ9618FDmuRVXny34Vvdn/0grZqbALhibjw8V6N0rIK5GfbjUmLJ hjOI2pM3XR/NuWB7Cwl3lDhlKndM21SsEPBJNmK2N+zAG7UqvtNd3v9CfX4xKl9EERTL hKKKCy/Zdzii/lXgAYwg7tTNgTIq9BM9rrD1T73oQcuy7COtW6GX9Es6ABlMC4xMImlg FfiVY8z8Jv2huz1qbU50M9kLtKLXuL+qqUfHtM2kKHZ/GsoftnMv2b/oPN6YFKXjD5AE ECvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729718288; x=1730323088; 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=Ro5RqAQqx8d+zminRr5BG8GspJEM/UgrambiU1969Zs=; b=w9AFjlkosJArViaXGXuj/r5HDqroUCbfzwtvFVwHtXgoWXVXNULcurPl7o7VZl+jqS 9hNdo4XX1L2TCCfAogFgAbsBmUKmSliIjSScL80TBQcYTnBuD6YJD2NesHNZNLgebLfs hbeH3Du5gDx2AXp2b3tEElr18PRewaD0om7yJrdnAfdpuumryiiVxkyJpUT9iO2pMdGv KoNGjuc5dm68VLJRTBgIBDySrDHRl3P6mMTesrCQLRXW411h0oei0sx1XvNpIK/L6/9i vbqMTTrIl8ziS38NabJqtv7DlpPQNTm7GWe/qbdsCJRur+6gJsU/mcyWXjCmq8i9CS5w Wq6w== X-Forwarded-Encrypted: i=1; AJvYcCVDqGfmICmqas3HoPTKbFp+IIwyhos6MQ1Z5ljgd3WtEhMDL16tAP66byAAmCLXiQQaJ9f4dEU=@dpdk.org X-Gm-Message-State: AOJu0YwwaVrux1NtRI4kzJtGzgE4tSpJJlmJY9j1GZhBtz20hcUWBBx/ uc6Aq5hioPIvOqOK2FSqRuqJu1VkKyhZ6ZTaBwX5BOsjjEkDueTy X-Google-Smtp-Source: AGHT+IEDmnW9i4zM5XkpHwcGyiu/VbEVxa2tHBqhio7KUJLiM8XiblIBJYfSY6Z78PTBkS+6aCBPHw== X-Received: by 2002:a05:600c:5490:b0:42c:a905:9384 with SMTP id 5b1f17b1804b1-4318415c8bcmr27686795e9.20.1729718288187; Wed, 23 Oct 2024 14:18:08 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:21cd:def0:a01d:d2aa]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43186c50a49sm26694605e9.48.2024.10.23.14.18.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 14:18:07 -0700 (PDT) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: Chengwen Feng , Chenbo Xia , =?UTF-8?q?Morten=20Br=C3=B8rup?= , Konstantin Ananyev , Wathsala Vithanage , dpdk stable Subject: patch 'examples/vhost: fix free function mismatch' has been queued to stable release 22.11.7 Date: Wed, 23 Oct 2024 22:15:58 +0100 Message-ID: <20241023211704.1216956-18-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241023211704.1216956-1-luca.boccassi@gmail.com> References: <20241023211704.1216956-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 Hi, FYI, your patch has been queued to stable release 22.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/25/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/afdb0a605db01cbc2b2f9e32b47e28680e71927a Thanks. Luca Boccassi --- >From afdb0a605db01cbc2b2f9e32b47e28680e71927a Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 8 Oct 2024 09:47:09 -0700 Subject: [PATCH] examples/vhost: fix free function mismatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit ae67f7d0256687fdfb24d27ee94b20d88c65108e ] The pointer bdev is allocated with rte_zmalloc() and then incorrectly freed with free() which will lead to pool corruption. Bugzilla ID: 1553 Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample") Signed-off-by: Stephen Hemminger Acked-by: Chengwen Feng Reviewed-by: Chenbo Xia Acked-by: Morten Brørup Acked-by: Konstantin Ananyev Acked-by: Wathsala Vithanage --- 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 3709d7ed06..197ad6250b 100644 --- a/examples/vhost_blk/vhost_blk.c +++ b/examples/vhost_blk/vhost_blk.c @@ -785,7 +785,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 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-10-23 22:16:41.238103069 +0100 +++ 0018-examples-vhost-fix-free-function-mismatch.patch 2024-10-23 22:16:40.451940874 +0100 @@ -1 +1 @@ -From ae67f7d0256687fdfb24d27ee94b20d88c65108e Mon Sep 17 00:00:00 2001 +From afdb0a605db01cbc2b2f9e32b47e28680e71927a Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit ae67f7d0256687fdfb24d27ee94b20d88c65108e ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -27 +28 @@ -index 03f1ac9c3f..9c9e326949 100644 +index 3709d7ed06..197ad6250b 100644 @@ -30 +31 @@ -@@ -776,7 +776,7 @@ vhost_blk_bdev_construct(const char *bdev_name, +@@ -785,7 +785,7 @@ vhost_blk_bdev_construct(const char *bdev_name,