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 BE75845A9F for ; Wed, 2 Oct 2024 20:39:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C696E4066F; Wed, 2 Oct 2024 20:39:38 +0200 (CEST) Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mails.dpdk.org (Postfix) with ESMTP id BA21240616 for ; Wed, 2 Oct 2024 20:39:32 +0200 (CEST) Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-7163489149eso46935a12.1 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=W/HuOENNGkTcxYNGE7OalLd/w6wbuqm+N7j53n+CbEqGIWkipwsicGvsd5YLveF0Wm fh59AbMUIpyDzWeTmAYilJH4apsJOZEl2SfHAZk41/O1KibB9GrLfikAv07cPyoDFclB /EPJ/V2zq8a1Wcr5liJVehL1Sd5vrGl9IdFRxUvp9JWIMFrJgd+JxR59fy3aPx4o3VNo lGrwQQ23ump6bub55R0eE+cImwrVHTZ0vVyzwAXoIYYzrW+rC1XzHhEpDs2Mf4zJeL2B xtkWx51qnCG6Y/oEWevmDk1IffwXgoPe+LvpRcooIj4RZg6dK/dKQPpGXqQ8+PR0z2Cy VM3A== X-Forwarded-Encrypted: i=1; AJvYcCWbJZ3ZI0ZUmsB7mr8GQnUe5NISklpzMT4qPrAmYk0MO17VTzGiMlgg/S8jFcVnK/PvrOHGKZ4=@dpdk.org X-Gm-Message-State: AOJu0YxidvDPsHi/4UwoQdFiLCQk/UUuYNkfx71+BrDD2zrcM/5qzq0Y 65wqECNWbOltilfYFeb68Fiho2K6pFOMubYn7xLkvshOF8Y+rRt5Ky04/xO0WlE= 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: 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