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 0C675A051C for ; Tue, 11 Feb 2020 12:28:03 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 041921BDFD; Tue, 11 Feb 2020 12:28:03 +0100 (CET) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 2DD151BF99 for ; Tue, 11 Feb 2020 12:28:02 +0100 (CET) Received: by mail-wr1-f68.google.com with SMTP id c9so11907693wrw.8 for ; Tue, 11 Feb 2020 03:28:02 -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=klI13lcWTcyCEqXt0gcxaP6pKmh9VSzeGkJcITDVeHw=; b=CEhN/Wv+Cg5uugbyY6LnVxqjBZhD5D+IRWV6qD8KoFExI5i7k3MY0KucCVAFnHZnbv 7IL2Mq1j2jX9KCuwj4x+MsJKMa5AF1heLXkdN18N+/UYPFEsI58dpqWx0bpWtzInHot7 cB+IMvbrewY2Ozz8FDzROqwE8dEtTdIEfrj/eotsebrb6ids3IoEmCtuBPuj9+veJzZL MzT6Q1nu/iVx8c8ecI7477Qlv6cvhEXCcnoq2uX8/O2tqMPK569SokjyNHREkJrRM6DP 8Jx5UtgFNPCXCn1MWs29wT6ORZGDTP5rZe3oiKb9YSa3a95T45cvjPSagPlucvGCe9iI tehQ== 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=klI13lcWTcyCEqXt0gcxaP6pKmh9VSzeGkJcITDVeHw=; b=MffqWurENNcq+VfR5zbwSbonceA8Ae2M8DbKKd0GBZPQxoVQ22YEd1BuIVQhZc1BZW jrJX+w70EoS7eNI/0yI6mfkOG1D52fwZCLvjR+w1PlWSqsUaIko1RWspd3bHg8HedSpX EdxVrgAJKvNvW4oOLTdjZ0pWfRgjV1BfBspXmAnLnVNNf1o6fdXBuiTG7Ev/o6EMuALp RIprr57wExTfTlxKhhmQVeYqUrmBBlbnahtka/5yxqDkJwWSR+7yqT6MyoFfv3Ajnkd2 7XljuYYA63m5HtNi/dP9a4/ShTJps7fwRQeHNSKvfZaYWk7ViW7RxEc12n/hObTMsPGt Gy6g== X-Gm-Message-State: APjAAAUpArg8hSIg+uFTJAfjmK+XQktjgiK27zyViuOkuFdmkzcq2C0c p/Lro4Kru+evx8g/yWAr4Zvz3+dkinc= X-Google-Smtp-Source: APXvYqxtQInuZff6Qef4A1y/ntDr4GSe0yzkenQZglWPd8EZp3LLridrsz4dsMp19Go5SVu5gg9+9Q== X-Received: by 2002:adf:f3cd:: with SMTP id g13mr8322137wrp.54.1581420481920; Tue, 11 Feb 2020 03:28:01 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id z21sm3466767wml.5.2020.02.11.03.28.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:28:01 -0800 (PST) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: Tiwei Bie , dpdk stable Date: Tue, 11 Feb 2020 11:20:10 +0000 Message-Id: <20200211112216.3929-64-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/virtio-user: check file descriptor before closing' has been queued to stable release 19.11.1 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 stable release 19.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/13/20. 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 8991c00f7b7237636bf91277ebb4cb0a16f4a8b9 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 6 Jan 2020 11:18:37 -0800 Subject: [PATCH] net/virtio-user: check file descriptor before closing [ upstream commit b56c12acf20585ad46faf9455b4b9aeb30450ef0 ] Valgrind complains that virtio_user is calling close(-1). Fix this by adding check in virtio that is similar to existing code. Fixes: 37a7eb2ae816 ("net/virtio-user: add device emulation layer") Signed-off-by: Stephen Hemminger Reviewed-by: Tiwei Bie --- 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 ea016e85d8..ffbaa75b7e 100644 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c @@ -537,7 +537,8 @@ virtio_user_dev_uninit(struct virtio_user_dev *dev) close(dev->kickfds[i]); } - close(dev->vhostfd); + if (dev->vhostfd >= 0) + close(dev->vhostfd); if (dev->is_server && dev->listenfd >= 0) { close(dev->listenfd); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:41.255809396 +0000 +++ 0064-net-virtio-user-check-file-descriptor-before-closing.patch 2020-02-11 11:17:38.456002394 +0000 @@ -1,13 +1,14 @@ -From b56c12acf20585ad46faf9455b4b9aeb30450ef0 Mon Sep 17 00:00:00 2001 +From 8991c00f7b7237636bf91277ebb4cb0a16f4a8b9 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 6 Jan 2020 11:18:37 -0800 Subject: [PATCH] net/virtio-user: check file descriptor before closing +[ upstream commit b56c12acf20585ad46faf9455b4b9aeb30450ef0 ] + Valgrind complains that virtio_user is calling close(-1). Fix this by adding check in virtio that is similar to existing code. Fixes: 37a7eb2ae816 ("net/virtio-user: add device emulation layer") -Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger Reviewed-by: Tiwei Bie