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 72D29A0093 for ; Tue, 19 May 2020 15:14:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6B1C61D92B; Tue, 19 May 2020 15:14:59 +0200 (CEST) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id 75A9E1D931 for ; Tue, 19 May 2020 15:14:58 +0200 (CEST) Received: by mail-wm1-f66.google.com with SMTP id z4so3021795wmi.2 for ; Tue, 19 May 2020 06:14:58 -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=PMyFGAlJOnUHqp5V9I5FOE/iNQ84wce7Oyj8VDPe+s8=; b=e1VK/Llu+99oqkE36k5kmHi5T4zNBxGu5pdA7pZQv7RiFJIGAwtCHjgXGySxq/3uTi h5KMyPvwaVp2NDqQlyhHcxxJEJNqfDCvS4RnmrmXM5A+mWfbnfLs9iZdNTPiuS39dMYA q0s6ShadcGpkzUtYMcy88JRJ4FxYAfn0iliJ7Y1no0nFtCQkWloI7mFIrmeEmdO9xaGX FE0SBnAksnGm3xWTcudgGWz1MV56gRYjFWjthwwiioWYrSqYidI+0JRXqtNaIOB63dPh iat3M0BGRelk+FKSLFs3u91RIVeu8PQ0daXb/oEDeQso1nUL67cO3B2MNlpQaTr/DShQ 1oOQ== 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=PMyFGAlJOnUHqp5V9I5FOE/iNQ84wce7Oyj8VDPe+s8=; b=oWLTCtZaeYlQONMvVu3We5oV3lJ7mPML4/NFGi9OtSk+iJdRz6Ita+Afqh8uyceLfs OKLat1wA8nYyLEaJhJ5lLXz6wtdMFE6K98b9qgBZ+GKfsBLnvnr84qy0PdmPlR+ZS3C2 GvOWMV8bzGirgkjJEEAPR9CHUfsN2bTlEypCypfcPctQoVClZIAjB0M2DuopN8ZDuuEU 1lrj25IxVY1Fdy8SjKiDYZbP3dJfRczbgzn5izobzncOcpqHcgzPWNRqueHVpp+1tLN4 TP02Mm25BiJHIIgzWXTZDOA0pa8WUJB+LrmPnWOp/qgdHJjqWelQLpJxvBe8Na7A5MNP gwYQ== X-Gm-Message-State: AOAM531Oho8Ey5lMau5YxQ3K4MIDKgzkhkDeC0gfbBsGddzNSiJazyWE yEMvBuY+l4qI8z74PFWSaD0= X-Google-Smtp-Source: ABdhPJwHWTLZKeg+GffvLGyh7UXOQcbYPqxeRImdAC8/FPOC63ssMm6xbpX0kcdyUTo4Opxm6DPuzw== X-Received: by 2002:a1c:3984:: with SMTP id g126mr5215800wma.169.1589894098205; Tue, 19 May 2020 06:14:58 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id x184sm3973407wmg.38.2020.05.19.06.14.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:14:57 -0700 (PDT) From: luca.boccassi@gmail.com To: Yunjian Wang Cc: Ravi Kumar , dpdk stable Date: Tue, 19 May 2020 14:05:09 +0100 Message-Id: <20200519130549.112823-174-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 'crypto/ccp: fix fd leak on probe failure' 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 9b91b991b69c8f44c194259e42a4197261c06593 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Sun, 26 Apr 2020 14:36:15 +0800 Subject: [PATCH] crypto/ccp: fix fd leak on probe failure [ upstream commit 4f429be4c09a00ccc5cd13cfb14a11f90958ac74 ] Zero is a valid fd. When ccp_probe_device() is failed, the uio_fd won't be closed thus leading fd leak. Fixes: ef4b04f87fa6 ("crypto/ccp: support device init") Signed-off-by: Yunjian Wang Acked-by: Ravi Kumar --- drivers/crypto/ccp/ccp_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/ccp/ccp_dev.c b/drivers/crypto/ccp/ccp_dev.c index 80fe6a4533..7d98b2eb25 100644 --- a/drivers/crypto/ccp/ccp_dev.c +++ b/drivers/crypto/ccp/ccp_dev.c @@ -760,7 +760,7 @@ ccp_probe_device(const char *dirname, uint16_t domain, return 0; fail: CCP_LOG_ERR("CCP Device probe failed"); - if (uio_fd > 0) + if (uio_fd >= 0) close(uio_fd); if (ccp_dev) rte_free(ccp_dev); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 14:04:51.623305330 +0100 +++ 0174-crypto-ccp-fix-fd-leak-on-probe-failure.patch 2020-05-19 14:04:44.516653810 +0100 @@ -1,13 +1,14 @@ -From 4f429be4c09a00ccc5cd13cfb14a11f90958ac74 Mon Sep 17 00:00:00 2001 +From 9b91b991b69c8f44c194259e42a4197261c06593 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Sun, 26 Apr 2020 14:36:15 +0800 Subject: [PATCH] crypto/ccp: fix fd leak on probe failure +[ upstream commit 4f429be4c09a00ccc5cd13cfb14a11f90958ac74 ] + Zero is a valid fd. When ccp_probe_device() is failed, the uio_fd won't be closed thus leading fd leak. Fixes: ef4b04f87fa6 ("crypto/ccp: support device init") -Cc: stable@dpdk.org Signed-off-by: Yunjian Wang Acked-by: Ravi Kumar