From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2105DA04F3 for ; Thu, 19 Dec 2019 15:36:06 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 164ED330; Thu, 19 Dec 2019 15:36:06 +0100 (CET) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 9314B1BF75 for ; Thu, 19 Dec 2019 15:36:04 +0100 (CET) Received: by mail-wr1-f66.google.com with SMTP id w15so6230570wru.4 for ; Thu, 19 Dec 2019 06:36:04 -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=RXIuQOqthSOUjG3iCaMCiY0WnDHlW8i1Xn+Rfon0oHk=; b=aOjH3NLbGc6VGa0lzEiJSr4v2vn0p8xeSOx2HjuoOKsQh0ZLzvI75t+b87VXUv1O/a aKFvApCPHFzzRVwAqUMSLBVAF28M86xjAA/3OeasFy5HU4iHCNuikNMOieXOES27j/sS gJyyAiETKKl/5BIG5iMTL8wR0ZacQyyO8jiWycArUn/AE+eyBFFcJTCmXxIvDwdphNBq jAl+ZHybmqwYhk+xZdN5kaR3Fdj5AMNXd8A6/vkVSAtjYzdZKbv1ycGBNITki0OrMvxw JfJwYhT7Tg+laywLlbFkk7CvpsgNYVPZRpPesyevoMUlcgyVo1Oa6kZsGPz5kLthhHXv rk6A== 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=RXIuQOqthSOUjG3iCaMCiY0WnDHlW8i1Xn+Rfon0oHk=; b=Mu32Vd7dyhJaI3sigWwF+PDqEUlEeVJBovkgMt4pC8FzA0yc37bH3N1aNA+0U1MFba C68RrF728tCxBIbWGiMd80OPnk7wvLGI7D+l9nvYVbhYHyuen84VAwgOdtBOrskstKKr sCMFnlNGkoIyH3TufH/E/iBMTaoVAPOXHhNOGd2FMSQ65KdvU3qU95S+X8zQ/YiC0Fsb nRmi+4bxPHWdtIvUnRil1FnscRf8G5DLMziIc2phNLlccRK6gPzpZ3fFaq2X7/E6FZHw 8n7N/CTcY8N5oRbsBf1wixHADlq9OzVABfu6XdyOYGvH5c2Yj1oaFsdHD5zotoOpGzu5 oXFw== X-Gm-Message-State: APjAAAUUQ2WKLNBoYH70Jndz65YeSNTppkj+ZKvPCRy2TY+6UD+8xbRP kBDndRbiWbknCr/ZTIJ+Nls= X-Google-Smtp-Source: APXvYqwJHMaVH7BKMabGAo2NJxLSj036k46SYxwunVu7s275kGevM0TLnI1/1knUHGYoGEo6QP7IsA== X-Received: by 2002:adf:f244:: with SMTP id b4mr9628855wrp.88.1576766164335; Thu, 19 Dec 2019 06:36:04 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id s19sm6272738wmj.33.2019.12.19.06.36.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 06:36:03 -0800 (PST) From: luca.boccassi@gmail.com To: Tiwei Bie Cc: Maxime Coquelin , dpdk stable Date: Thu, 19 Dec 2019 14:32:54 +0000 Message-Id: <20191219143447.21506-27-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191219143447.21506-1-luca.boccassi@gmail.com> References: <20191219143447.21506-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'vhost: fix slave request fd leak' has been queued to LTS release 17.11.10 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 LTS release 17.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/21/19. 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. Thanks. Luca Boccassi --- >From 72baa70cdbf5b75dc14548f02923e23eb84bca71 Mon Sep 17 00:00:00 2001 From: Tiwei Bie Date: Thu, 5 Sep 2019 19:01:25 +0800 Subject: [PATCH] vhost: fix slave request fd leak [ upstream commit 761d57651c51365354cefb624883fccf62aee67d ] We need to close the old slave request fd if any first before taking the new one. Fixes: 275c3f944730 ("vhost: support slave requests channel") Signed-off-by: Tiwei Bie Reviewed-by: Maxime Coquelin --- lib/librte_vhost/vhost_user.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index 155394a6d9..221217c3f4 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -1177,6 +1177,9 @@ vhost_user_set_req_fd(struct virtio_net *dev, struct VhostUserMsg *msg) return -1; } + if (dev->slave_req_fd >= 0) + close(dev->slave_req_fd); + dev->slave_req_fd = fd; return 0; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-12-19 14:32:27.408464899 +0000 +++ 0027-vhost-fix-slave-request-fd-leak.patch 2019-12-19 14:32:25.673289259 +0000 @@ -1,13 +1,14 @@ -From 761d57651c51365354cefb624883fccf62aee67d Mon Sep 17 00:00:00 2001 +From 72baa70cdbf5b75dc14548f02923e23eb84bca71 Mon Sep 17 00:00:00 2001 From: Tiwei Bie Date: Thu, 5 Sep 2019 19:01:25 +0800 Subject: [PATCH] vhost: fix slave request fd leak +[ upstream commit 761d57651c51365354cefb624883fccf62aee67d ] + We need to close the old slave request fd if any first before taking the new one. Fixes: 275c3f944730 ("vhost: support slave requests channel") -Cc: stable@dpdk.org Signed-off-by: Tiwei Bie Reviewed-by: Maxime Coquelin @@ -16,11 +17,11 @@ 1 file changed, 3 insertions(+) diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c -index 0b72648a5a..f468436103 100644 +index 155394a6d9..221217c3f4 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c -@@ -1564,6 +1564,9 @@ vhost_user_set_req_fd(struct virtio_net **pdev, struct VhostUserMsg *msg, - return RTE_VHOST_MSG_RESULT_ERR; +@@ -1177,6 +1177,9 @@ vhost_user_set_req_fd(struct virtio_net *dev, struct VhostUserMsg *msg) + return -1; } + if (dev->slave_req_fd >= 0) @@ -28,7 +29,7 @@ + dev->slave_req_fd = fd; - return RTE_VHOST_MSG_RESULT_OK; + return 0; -- 2.20.1