From patchwork Tue Feb 7 16:22:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 123357 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5387D41C30; Tue, 7 Feb 2023 17:22:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F25040A84; Tue, 7 Feb 2023 17:22:48 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 061CC40151 for ; Tue, 7 Feb 2023 17:22:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675786966; 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=EjWKy5NlcDclP5PtGAc4CcU0VsitbVsXAJhox0Tk8is=; b=WX4mbT0oVPY9FzyA4i2rhzFbAuzjCgro9GQ5ODvUBF6E2OnooBpBXjKlXR5gRGXe9wUFwq Nw3hSc48DGUfFbpE9sUgKgPT6cEkC2K8GjtordlhY1jrONuA0Wu8shWN0O93YM2xTwbxIT syPW87e0INZYFmiwyN1QXapyPFFZtDc= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-615-T1A0MDvDOj6RiEJmd_3cYQ-1; Tue, 07 Feb 2023 11:22:45 -0500 X-MC-Unique: T1A0MDvDOj6RiEJmd_3cYQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F100A3C1014C; Tue, 7 Feb 2023 16:22:44 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0118A2026D38; Tue, 7 Feb 2023 16:22:43 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, david.marchand@redhat.com, chenbo.xia@intel.com Cc: Maxime Coquelin Subject: [PATCH v3 0/2] Vhost: fix FD leaks and improve logs Date: Tue, 7 Feb 2023 17:22:38 +0100 Message-Id: <20230207162240.292020-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 This two-patches series fix possible FD leaks when receiving Vhost-user messages fails. It also improve logging by differentiating message's buffer truncation and control data truncation. Changes in v3: ============== - Improve logs on error (David) Maxime Coquelin (2): vhost: fix possible FDs leak vhost: fix possible FD leaks on truncation lib/vhost/socket.c | 8 +++++--- lib/vhost/vhost_user.c | 40 ++++++++++++++++++++++++++-------------- 2 files changed, 31 insertions(+), 17 deletions(-)