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 5E1B345A9F; Wed, 2 Oct 2024 20:40:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76D0E4066E; Wed, 2 Oct 2024 20:39:37 +0200 (CEST) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mails.dpdk.org (Postfix) with ESMTP id BB7C54064A for ; Wed, 2 Oct 2024 20:39:32 +0200 (CEST) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-71957eb256bso159060b3a.3 for ; Wed, 02 Oct 2024 11:39:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727894372; x=1728499172; 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=fOrrDcTCWuEJkwqA7AiWSFK994s+lViT832e1+jyr4Z214uQYNpxhB21FUJHjBKf18 EBJVluPU5THGukCB/MapxUWMB2BmZ4Fmdag18aq0uQY8RNShPluNC4Jnle6waHN0ObgC aQE6kAAa7WU3BgiFM6+3UH/xRac8WIjJA9sgJioyDvWWbtiReMjFtf/GWNVfVo9iFu4k GP8eMwwDwiw6XxR9hDHpCb20Zx50VI1PGGtQS+fvHUlqFQ3wT7z88uTS4nVHHWWX6eGD mjbNysvoQz10qXt1Dr2fV+xapnV+CicCBX3MpijJV37IT/QlS7+aRsgc6mIP2OXLdWwu 9D/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727894372; x=1728499172; 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=T+GnfdsOczAhXfgJZ3yXvFnbacgckY5Obr6wYC1A1vVe5jfeN3Qitnu9TXbeQBNkga PRW9dattRjTTB44W2W5mTRDoixb5hP7qaDDH4TfyUHAEVJisdmfgA6dB/szDaBrTUfe/ NQlVZ7AYE9+ATbDu3SXQMnZet9Y2RxtqB6tu6v7Ewg8RukfDMW6TGGOlgXp5h/cy5PRY 5eUF9Wv950fRMqKYQGFQGrbUkUQzgdwauoEFGbBUmKvqSqbiC/+jDgFrxizTzzfYHNWa oP3nPxEmsFU876nExjdx/RfCmFWNuGrwyJmIsMy2JKgIkxVrruCE/CNi+LxvVgCvVCr/ c6tw== X-Gm-Message-State: AOJu0YxYxf57w1bndU/JX+vdYz6plyt+1yzs/cTsgWWLrmwdyp2hQUkK +QB5wEEEasUgaP49BuVQz+7VsTEw+n83cG6rTqOrpx4SzKv7zHbsOtZG3iJLeuMc0xhUBPgqmM5 v X-Google-Smtp-Source: AGHT+IG3TfuM17Vnstq1AEq4LMHvKWpVCDtH4cCM++IZ6AUiinNJXZr7JtRvPNz8zw246XV05QIwVw== X-Received: by 2002:a05:6a21:2d8b:b0:1d5:10c3:af5a with SMTP id adf61e73a8af0-1d5e2d3df25mr5909773637.47.1727894371939; Wed, 02 Oct 2024 11:39:31 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71b2649b0bdsm10104362b3a.34.2024.10.02.11.39.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Oct 2024 11:39:31 -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 v7 05/16] examples/vhost: fix free function mismatch Date: Wed, 2 Oct 2024 11:37:43 -0700 Message-ID: <20241002183918.161656-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241002183918.161656-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20241002183918.161656-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