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 A3A5BA00BE for ; Tue, 19 May 2020 15:11:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8C1561D6FF; Tue, 19 May 2020 15:11:18 +0200 (CEST) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id B86261D6FB for ; Tue, 19 May 2020 15:11:17 +0200 (CEST) Received: by mail-wm1-f67.google.com with SMTP id f134so3020546wmf.1 for ; Tue, 19 May 2020 06:11:17 -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=ka97kHZ7fLa83FKjlPlFuq+yw+9Y1jYsgpoqXqbne74=; b=JkZrLABp4zfQbCfU9m3dXBJKEV+2wnPUMDi43pXvllHBMQ+2Lh/zsVYeY7zO0pnsC6 yLZVQAk3Fni2QBMBOpD5r7fKYKQa2r5eNldO0vNZRkY/sH8qCOBWnH7cza1SXh+kxzNK dCHSoBIoPnpT9VIDpFixMqlNAy9YF0+v5KVBZZ5HpcBDnCqg9pdSKBKenRg1ukb3Ct70 3OrVO+9HnmEHtrlQQWwEpODQyyFg06VAd5CF9NdJYKKNtjmIrQAy5bZgsOsjDXa72AYJ lApwvkRwHpEyCUfaOk2ccPByLjvoeSA4Y9zX/iNm1aYb+cdZdGBGO1pY8ffJqkCwoviv zftQ== 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=ka97kHZ7fLa83FKjlPlFuq+yw+9Y1jYsgpoqXqbne74=; b=nuAIfm/pNMDlBnGjVxLAp5w05/YMqmAqikmAjgd5E3gp5Re0KKpK3EbHGMJdHnpuQV F1Ww30nJ3Ocz9iAjj++wQWdJHgET1ZKU+1QywZxJbwCo4ZOXrKnouUJURtKABFusAQa5 TMF/WZIybNeNIAWVl9SWUFlSGXiFNDH7tJyjSJuoaI83aPB61CePMnd4k/oY1TcKSnv3 OmlSOXqtdrKAQVWD2r4u3KfTGBpDDjkLolWIzO4AeRUqgs9Duwt0onHmvNn1Wigo329o nWJjXDB4xb9rj3telthcE2Nqix/QEOduvdL/H9PTaDxSY53xcblQY7c9XuY67isoeXM/ ni1Q== X-Gm-Message-State: AOAM532Fn3f+UxrlXbN90yzp+mwYDH1Fa736SRTRSdGQR16NLMVPeVao xYsfQpvX9Cyt8T2oUrr9BSCIdeSpXOOrNBof X-Google-Smtp-Source: ABdhPJxa0L8s9FKXo0NDJBDIJmLekY+zKYqEgNNeHSrZcDo7oL+DnlzBY66aaAwILFdcS8eOl3fd5g== X-Received: by 2002:a05:600c:297:: with SMTP id 23mr5709215wmk.12.1589893877460; Tue, 19 May 2020 06:11:17 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id e5sm20539482wro.3.2020.05.19.06.11.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:11:16 -0700 (PDT) From: luca.boccassi@gmail.com To: Yunjian Wang Cc: Ferruh Yigit , dpdk stable Date: Tue, 19 May 2020 14:03:57 +0100 Message-Id: <20200519130549.112823-102-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519130549.112823-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> <20200519130549.112823-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/tap: fix queues fd check before close' has been queued to stable release 19.11.3 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.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/21/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 ac051be918c7237f8db11090cf0d709d8a2925e2 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Fri, 17 Apr 2020 20:03:57 +0800 Subject: [PATCH] net/tap: fix queues fd check before close [ upstream commit 13b698d11feca4ab12237303d553dc4e89d8a8d6 ] The fd is possibly a negative value while it is passed as an argument to function "close". Fix the check to the fd. Fixes: ed8132e7c912 ("net/tap: move fds of queues to be in process private") Signed-off-by: Yunjian Wang Reviewed-by: Ferruh Yigit --- drivers/net/tap/rte_eth_tap.c | 4 ++-- drivers/net/tap/tap_intr.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index e644f8875b..7081ae23e9 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -1089,7 +1089,7 @@ tap_rx_queue_release(void *queue) if (!rxq) return; process_private = rte_eth_devices[rxq->in_port].process_private; - if (process_private->rxq_fds[rxq->queue_id] > 0) { + if (process_private->rxq_fds[rxq->queue_id] != -1) { close(process_private->rxq_fds[rxq->queue_id]); process_private->rxq_fds[rxq->queue_id] = -1; tap_rxq_pool_free(rxq->pool); @@ -1109,7 +1109,7 @@ tap_tx_queue_release(void *queue) return; process_private = rte_eth_devices[txq->out_port].process_private; - if (process_private->txq_fds[txq->queue_id] > 0) { + if (process_private->txq_fds[txq->queue_id] != -1) { close(process_private->txq_fds[txq->queue_id]); process_private->txq_fds[txq->queue_id] = -1; } diff --git a/drivers/net/tap/tap_intr.c b/drivers/net/tap/tap_intr.c index 58f36d3ccb..5cf4f173a0 100644 --- a/drivers/net/tap/tap_intr.c +++ b/drivers/net/tap/tap_intr.c @@ -71,7 +71,7 @@ tap_rx_intr_vec_install(struct rte_eth_dev *dev) struct rx_queue *rxq = pmd->dev->data->rx_queues[i]; /* Skip queues that cannot request interrupts. */ - if (!rxq || process_private->rxq_fds[i] <= 0) { + if (!rxq || process_private->rxq_fds[i] == -1) { /* Use invalid intr_vec[] index to disable entry. */ intr_handle->intr_vec[i] = RTE_INTR_VEC_RXTX_OFFSET + -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 14:04:48.609446182 +0100 +++ 0102-net-tap-fix-queues-fd-check-before-close.patch 2020-05-19 14:04:44.312650112 +0100 @@ -1,13 +1,14 @@ -From 13b698d11feca4ab12237303d553dc4e89d8a8d6 Mon Sep 17 00:00:00 2001 +From ac051be918c7237f8db11090cf0d709d8a2925e2 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Fri, 17 Apr 2020 20:03:57 +0800 Subject: [PATCH] net/tap: fix queues fd check before close +[ upstream commit 13b698d11feca4ab12237303d553dc4e89d8a8d6 ] + The fd is possibly a negative value while it is passed as an argument to function "close". Fix the check to the fd. Fixes: ed8132e7c912 ("net/tap: move fds of queues to be in process private") -Cc: stable@dpdk.org Signed-off-by: Yunjian Wang Reviewed-by: Ferruh Yigit