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 35136A0524 for ; Fri, 5 Feb 2021 12:29:42 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F0A7840682; Fri, 5 Feb 2021 12:29:41 +0100 (CET) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mails.dpdk.org (Postfix) with ESMTP id 616B140682 for ; Fri, 5 Feb 2021 12:29:41 +0100 (CET) Received: by mail-wr1-f54.google.com with SMTP id v15so7310040wrx.4 for ; Fri, 05 Feb 2021 03:29:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+wYPF3SLNekr8CiHWsNDD/OMPkYjrg+6lAKyFS3gNyM=; b=cWL2gzfdv62wKLU3o3XpUqLr5SuXPm4/wDn3nWPltbJf5gATpFhLe9EeNlqtoqkr9z /nDnUi/SRliRliNPWQvLQz44kGfgGaPoKLIZHZaX2Xh6JN4PdocuSnWI+jgfWGYC2dRv lmMGShveznaJlqnGbWQN80PLSYRdleJBF6XyFXHFyVNBBSumr0SNc807gIdQSItJznr2 QNKdhw5T5mFtEZc2+2QqoFB1U6tvmy6l0+qjWiQZn9mbOXL9YxKopzRbaErYGIs1iHmh U4i7u0txkhDtGGWM8RbSUx/JmXoZO3476kB+saxMDXYqJSAUAWdvFSN/AchntdYhWFCt d+vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+wYPF3SLNekr8CiHWsNDD/OMPkYjrg+6lAKyFS3gNyM=; b=Q7TLrS3pCaTpbToj1hoNpdPCdEhryIHSu33HPIN+eh5gu5tuWiH9mfTYplR5CMzuWO KElsgA36ebABEJPsbvJfttUOwDhu/0W8DyqdSXi8y+aMyEOmL1wkh9H/KKR82+qTCxhA 560Y7caG59i8XVNdTO/x1D0W7V0ET3CJ+/9QSryL6VkOfl8YnTg+x+P3FkwXDgbSacAv frMh1oyDAdStXGYwUMJk9HZaRNU1HID4TNdtfkDydIBjVquwrIRM3PpUdiDzB553Il+C d5y3ODLy0x13Bp95CQf1p60wh5ICYyBxb15lm7S0we0AxM/Y/lj0yluV4EBo9rL1sky1 Z/Lg== X-Gm-Message-State: AOAM531AYQ4lOw2MW5bn4SJES0AjZ7KGsLQVWSgig8quBkCI7XkpQQzl MIeJkP3U0uKBIXDKQtp4e2A= X-Google-Smtp-Source: ABdhPJzLbAYCz8JNW9s2zhtv2ukhaTkwVrH3mb9YxbeKJNQkfDUmHi8viJhSE9mYOpm+hsXZfFsYVg== X-Received: by 2002:adf:f7cf:: with SMTP id a15mr4530375wrq.351.1612524581034; Fri, 05 Feb 2021 03:29:41 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id u14sm8187670wmq.45.2021.02.05.03.29.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:29:39 -0800 (PST) From: luca.boccassi@gmail.com To: Jiawei Zhu Cc: Chenbo Xia , Maxime Coquelin , dpdk stable Date: Fri, 5 Feb 2021 11:16:13 +0000 Message-Id: <20210205111920.1272063-87-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/virtio-user: fix run closing stdin and close callfd' has been queued to stable release 20.11.1 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/c778b2b2480175f09d0c8fdf2addee4e8f470fe2 Thanks. Luca Boccassi --- >From c778b2b2480175f09d0c8fdf2addee4e8f470fe2 Mon Sep 17 00:00:00 2001 From: Jiawei Zhu Date: Sat, 12 Dec 2020 00:53:18 +0800 Subject: [PATCH] net/virtio-user: fix run closing stdin and close callfd [ upstream commit 97ed740c3498afab4162cb85492cd3109e21c604 ] When i < VIRTIO_MAX_VIRTQUEUES and j == i, dev->callfds[i] and dev->kickfds[i] are default 0. So it will close(0), close the standard input (stdin). And when the code fails in kickfd creation, it will leaves one callfd not closed. Fixes: e6e7ad8b3024 ("net/virtio-user: move eventfd open/close into init/uninit") Cc: stable@dpdk.org: Signed-off-by: Jiawei Zhu Reviewed-by: Chenbo Xia Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_user/virtio_user_dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c index 053f0267ca..e1cbad0d90 100644 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c @@ -276,6 +276,7 @@ virtio_user_dev_init_notify(struct virtio_user_dev *dev) } kickfd = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK); if (kickfd < 0) { + close(callfd); PMD_DRV_LOG(ERR, "kickfd error, %s", strerror(errno)); break; } @@ -284,7 +285,7 @@ virtio_user_dev_init_notify(struct virtio_user_dev *dev) } if (i < VIRTIO_MAX_VIRTQUEUES) { - for (j = 0; j <= i; ++j) { + for (j = 0; j < i; ++j) { close(dev->callfds[j]); close(dev->kickfds[j]); } -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:33.188307977 +0000 +++ 0087-net-virtio-user-fix-run-closing-stdin-and-close-call.patch 2021-02-05 11:18:28.934693549 +0000 @@ -1 +1 @@ -From 97ed740c3498afab4162cb85492cd3109e21c604 Mon Sep 17 00:00:00 2001 +From c778b2b2480175f09d0c8fdf2addee4e8f470fe2 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,2 @@ + +[ upstream commit 97ed740c3498afab4162cb85492cd3109e21c604 ]