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 4F4F7A0A0B; Mon, 1 Feb 2021 10:53:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC1A7160688; Mon, 1 Feb 2021 10:53:16 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 554C740693 for ; Mon, 1 Feb 2021 10:53:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612173194; 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: in-reply-to:in-reply-to:references:references; bh=sM1F+WQq/gpND/XUKuZFkuhf6GY+Z8jkMdmSaYSXcUU=; b=fEI8VNirkfdrE2bZWXw8u9AJXh0i4vLaU07ahh8csyvAfSmvvk7c8uYSeX7/zK/wzhGgEa w9WOoql5aF0qQAAJnzVozR0ibQZkZA6gx2/aEcMjVZ6x4qKtEmWyfUFLv2byctQJIr62Ej 62b7lkbp9KmIZ6tb9PFjYuctHy2aVxM= Received: from mail-ua1-f72.google.com (mail-ua1-f72.google.com [209.85.222.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-445-qps_e0ZRP7S2i0vAbyKhwg-1; Mon, 01 Feb 2021 04:53:10 -0500 X-MC-Unique: qps_e0ZRP7S2i0vAbyKhwg-1 Received: by mail-ua1-f72.google.com with SMTP id z4so5505259uan.8 for ; Mon, 01 Feb 2021 01:53:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sM1F+WQq/gpND/XUKuZFkuhf6GY+Z8jkMdmSaYSXcUU=; b=hW0iIehTrct4rTU1oTaDo0Tmfs7/apbWI2XRg3XQeH4IvcIGnITHGAT/JWQKgBOLFk gRNe2qtVfa+xH0KSAuAa4FVF9kSaU7d+NXhahSAWJnuw4FZYsT/tlgaj8irPtCohKD0i pCN6jNJjQQRxEiRLomCt+UyKWW8D/2N+h1MFbJ3+UlNILBODM2HgqNHSKDGSnhK87ap2 ZPHBplnv4W7AqMQKEF0Wr6seUHQuEaHqt0llNxDJx/TZzFcuOSV7Wbg89x4dD+iUxmxm 0SGkR9UrIBxRrdz+SLAXFw9507KiFGuMUQVVp6F3C310tluUtpXZYQteKmuc3nVu0P6E 8tSw== X-Gm-Message-State: AOAM531Ke49c4l4FIGZG/Q2rQkv9a2G63vx3QnV1e6oFdwV7xy++G0ck 2LaudByXtsJyGmyRZOvyQXE51XzLlntzH+JYz1GoH66ILKQ28O/awSod6qFdZXqiNMlhA3s/c11 sWyyQEPGPKR/pqlb+h74= X-Received: by 2002:a67:8ec7:: with SMTP id q190mr8753531vsd.10.1612173190466; Mon, 01 Feb 2021 01:53:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxjbtqmZ51oqxQHJSkFkui6p8nqamCKGT35+lL/Osv0272pby5As2D809jL6OkrYQ7KQy6U+NrvUffCt7Yc114= X-Received: by 2002:a67:8ec7:: with SMTP id q190mr8753519vsd.10.1612173190240; Mon, 01 Feb 2021 01:53:10 -0800 (PST) MIME-Version: 1.0 References: <20210201093317.6761-1-maxime.coquelin@redhat.com> In-Reply-To: <20210201093317.6761-1-maxime.coquelin@redhat.com> From: David Marchand Date: Mon, 1 Feb 2021 10:52:59 +0100 Message-ID: To: Maxime Coquelin Cc: dev , "Wang, Yinan" , "Xia, Chenbo" , Adrian Moreno Zapata , Wei Ling , Yu Jiang , Jun W Zhou Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] net/virtio: fix missing listen FD initialization 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 Sender: "dev" On Mon, Feb 1, 2021 at 10:33 AM Maxime Coquelin wrote: > > When running in client mode, the listen file descriptor > is not initialized, and so has value 0. At destroy time, > the listen FD is closed if its value is greater than or > equal to zero, which causes STDIN to be closed. > > Fixes: 949735312f5e ("net/virtio: move vhost-user specifics to its backend") > Bugzilla ID: 630 We put the Bugzilla ID: tag before Fixes:. > > Reported-by: Jun W Zhou > Signed-off-by: Maxime Coquelin > --- > drivers/net/virtio/virtio_user/vhost_user.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c > index ec2c53c8fb..f8569f6e6f 100644 > --- a/drivers/net/virtio/virtio_user/vhost_user.c > +++ b/drivers/net/virtio/virtio_user/vhost_user.c > @@ -831,6 +831,7 @@ vhost_user_setup(struct virtio_user_dev *dev) > dev->backend_data = data; > > data->vhostfd = -1; > + data->listenfd = -1; > > fd = socket(AF_UNIX, SOCK_STREAM, 0); > if (fd < 0) { > -- > 2.29.2 > Reviewed-by: David Marchand -- David Marchand