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 1F50CA0351 for ; Thu, 6 Aug 2020 11:59:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 172731C139; Thu, 6 Aug 2020 11:59:22 +0200 (CEST) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id 473B51C138 for ; Thu, 6 Aug 2020 11:59:21 +0200 (CEST) Received: by mail-wm1-f65.google.com with SMTP id g8so8296259wmk.3 for ; Thu, 06 Aug 2020 02:59:21 -0700 (PDT) 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=qBm6bg95EDxcKA4NGb2ObH1iidoGpKj3VOxi0GyGxfY=; b=Z9PviFZ6j15YjsiIyWDVAqcvcIFigZIkC/4HdzzQMkQ9fOrtBMj4kWQY3tVO3lATk9 TIaxm+mCV/1eQ+jf6cQsqq4FpwtpKCEwnEqm7GGumFLSKMb3+HFGhNQ4KJFFeL+CZ7O9 V4HjrK97HxXQvtNFJFgL+/UPjAQ0D3lhYTFdNfFP1o6NpaQrkRfgB2FVqzUcoxqMHwBh vtNFEz5PsBg7OkWB76WfArMhiQwV1oFK/4Vh97wr6nfkdr5KedLO7QRdCD97f5jIjv41 WHyTGUcLF/3dvUNYhzFh47Tgsl0UIOF0D4MzudrZvPIvvHAQGV4pMXSOslt+JpPaG4/p Se9Q== 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=qBm6bg95EDxcKA4NGb2ObH1iidoGpKj3VOxi0GyGxfY=; b=GWp7MxRlea1yJtSf5+zuPxjz6Sg0rdQGDml7YCzaD3dJJxhfmiqU5OWc+/edM4DqFt TPTWkBEUBDvmAdI2Depy1K1OMTA/q9V1z62ORsPbZ3zT+kHMK0myykZlwTlbkiDzn0fW iwRnatjAdGLwIfzJfDpbnnIvqg+qabCzrc9o6e6UHHxEc+h2snYB7Vgx0xaOb5l2PgAi G1xjLYJlfSebHmQ9rjtdYcaYhqh8ZJAIKsC7wDIjv3AVb0IFRexQZXxFkZb6D5RrEvEU Pe/POUZ3Irjy96kBmxomAdMy6QVpUJAsaDTCHzxxIgvlSo0JKyj38FUAr2/tAtOorYnj MT9A== X-Gm-Message-State: AOAM532AQDZhENlx4upzFy4aPMol6ggni+PhoNNrzhlTKvD/DqIFAfCZ qIQWbaY2fT6LbIMMHa0f2V1CXNgFdFyZVA== X-Google-Smtp-Source: ABdhPJxF4hNEvsWQLD+r5OTGcqUP5NizNAPfU96quSk1U93rfvL1pamlCel9MnKLpZlWJfFCu/GJWg== X-Received: by 2002:a7b:c1c3:: with SMTP id a3mr7497639wmj.111.1596707960955; Thu, 06 Aug 2020 02:59:20 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id g25sm5584555wmh.35.2020.08.06.02.59.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2020 02:59:20 -0700 (PDT) From: luca.boccassi@gmail.com To: Chenbo Xia Cc: Maxime Coquelin , dpdk stable Date: Thu, 6 Aug 2020 10:54:02 +0100 Message-Id: <20200806095411.774624-34-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200806095411.774624-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> <20200806095411.774624-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/virtio-user: check tap system call setting' has been queued to stable release 19.11.4 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.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/08/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 e769b739306fd5f8c69e205d0145bc6cd0e200a3 Mon Sep 17 00:00:00 2001 From: Chenbo Xia Date: Wed, 29 Jul 2020 13:12:30 +0000 Subject: [PATCH] net/virtio-user: check tap system call setting [ upstream commit 570ee25677d8634e99d2120b363f2dd4948d5bac ] Setting the flags of tapfd may fail and the return value should be checked. Coverity issue: 140739 Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost") Signed-off-by: Chenbo Xia Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_user/vhost_kernel_tap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c index 2fa4f0d66..acddefa33 100644 --- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c +++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c @@ -128,7 +128,10 @@ vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq, goto error; } - fcntl(tapfd, F_SETFL, O_NONBLOCK); + if (fcntl(tapfd, F_SETFL, O_NONBLOCK) < 0) { + PMD_DRV_LOG(ERR, "fcntl tapfd failed: %s", strerror(errno)); + goto error; + } if (ioctl(tapfd, TUNSETVNETHDRSZ, &hdr_size) < 0) { PMD_DRV_LOG(ERR, "TUNSETVNETHDRSZ failed: %s", strerror(errno)); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-08-06 10:53:17.109640479 +0100 +++ 0034-net-virtio-user-check-tap-system-call-setting.patch 2020-08-06 10:53:15.828597956 +0100 @@ -1,14 +1,15 @@ -From 570ee25677d8634e99d2120b363f2dd4948d5bac Mon Sep 17 00:00:00 2001 +From e769b739306fd5f8c69e205d0145bc6cd0e200a3 Mon Sep 17 00:00:00 2001 From: Chenbo Xia Date: Wed, 29 Jul 2020 13:12:30 +0000 Subject: [PATCH] net/virtio-user: check tap system call setting +[ upstream commit 570ee25677d8634e99d2120b363f2dd4948d5bac ] + Setting the flags of tapfd may fail and the return value should be checked. Coverity issue: 140739 Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost") -Cc: stable@dpdk.org Signed-off-by: Chenbo Xia Reviewed-by: Maxime Coquelin