From patchwork Thu Nov 12 17:10:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 84072 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1210CA09D3; Thu, 12 Nov 2020 18:10:48 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E63365928; Thu, 12 Nov 2020 18:10:46 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id CF80556A3 for ; Thu, 12 Nov 2020 18:10:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605201043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XMgbCkhJr7xR6mRGWwQwVfILt44+T8uYl+889AHEgAI=; b=HIrPJkzIeB+GT7JNQlTvYMV90i9K/e8zsgVTvKadeKc0XKYhTd+1nJ0SW1iivjkcdfRJJG Y4BihBU8SwXVCQGndOCOJgmwKzb82/6lYQXff9cpViYksiUEu2lsmBcsIBsmyRTjTIp4qR Fa0G4zV8bB0SWC23UrlR/FmyL/qeNQA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-301-x9A_d_S_P8aa_pX5IP-ylA-1; Thu, 12 Nov 2020 12:10:38 -0500 X-MC-Unique: x9A_d_S_P8aa_pX5IP-ylA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1219B10524FF; Thu, 12 Nov 2020 17:10:37 +0000 (UTC) Received: from localhost.localdomain (unknown [10.36.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9276628545; Thu, 12 Nov 2020 17:10:31 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, xuan.ding@intel.com, stephen@networkplumber.org, thomas@monjalon.net, stable@dpdk.org, chenbo.xia@intel.com, xuemingl@nvidia.com Cc: Maxime Coquelin Date: Thu, 12 Nov 2020 18:10:26 +0100 Message-Id: <20201112171029.354593-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [dpdk-dev] [PATCH v4 0/3] vhost: fix fd an memory leaks X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This series fixes several leaks in Vhost-user requests handling. Thanks to Xuan Ding from Intel for reporting these issues. Changes in v4: - Fix wrong return value in set_mem_table (Xueming) Changes in v3: - Remove the right closing of fds. (Chenbo) Changes in v2: - Fix typos in commit messages. (Chenbo) - Remove useless closing of fds in set_log_base. (Chenbo) Maxime Coquelin (3): vhost: fix error path when setting memory tables vhost: fix fd leak in dirty logging setup vhost: fix fd leak in kick setup lib/librte_vhost/vhost_user.c | 74 +++++++++++++++++++++++------------ 1 file changed, 49 insertions(+), 25 deletions(-)