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 618F345AE2 for ; Tue, 8 Oct 2024 17:43:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2DDAC40DFD; Tue, 8 Oct 2024 17:43:23 +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 39EA14021E for ; Tue, 8 Oct 2024 17:43:17 +0200 (CEST) Received: by mail-ot1-f47.google.com with SMTP id 46e09a7af769-715716974baso670825a34.1 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=tKGijDDpoBC4TIrngzykxyjnbx2ooo3gLfRRxdirJhz7PHE0QraOrtkCtRGkj4oTXy KoJafpeHf2GaNS6WUFrIYLndgXZ3A1hQczWcCFXJKI0SLX71IWfQVWxxUo/137cdNMd5 SNlVk/zAHBoCL7gsNQrfi9AeMHpxoT4b6K2Qk5+7iFdoCfhJ3sSMXoaHK+/d41bFxNwa 57VkPOc8VD5Kne/WQF0prHc30yAuucIonielZg0+9FQHCEmBVWcTzVLnTV7iFXenoN3i DUeG5vbo/Ok5tL7LTVwhrEaDuvdBpY1tPMGWQo43Kd9yZxPiUZPFHVwRVpHA+3V2A4/V XTkQ== X-Forwarded-Encrypted: i=1; AJvYcCX6MgE7mOP8pheWbX6pMdJJc2iB0Oe+oX/A6rvdw/BIk7E0hqHmcyAdYo1BefDYD2UcACkQCzs=@dpdk.org X-Gm-Message-State: AOJu0Yxj4sHnZv6NPA2udl3Y9LtkzaHK3GjhHegqDkUwNjmq0uZz12In ZezCjcQvhaaY3zWCLoKtMj8dA8f+0ddIEZxMnp5qNg9KQo9EggZHXyspq7I9TEs= 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: 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