[dpdk-stable] patch 'crypto/ccp: fix fd leak on probe failure' has been queued to stable release 19.11.3

Kumar, Ravi1 Ravi1.Kumar at amd.com
Tue May 19 15:20:06 CEST 2020


[AMD Public Use]

+Amar 

-----Original Message-----
From: luca.boccassi at gmail.com <luca.boccassi at gmail.com> 
Sent: Tuesday, May 19, 2020 6:35 PM
To: Yunjian Wang <wangyunjian at huawei.com>
Cc: Kumar, Ravi1 <Ravi1.Kumar at amd.com>; dpdk stable <stable at dpdk.org>
Subject: patch 'crypto/ccp: fix fd leak on probe failure' has been queued to stable release 19.11.3

[CAUTION: External Email]

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdpdk.org%2Fbrowse%2Fdpdk-stable&data=02%7C01%7Cravi1.kumar%40amd.com%7C7d732966a80441d4cb2608d7fbf6a1f0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637254909006890050&sdata=BQ8zWW2d9itJUf%2FBGPHtXaNLiskAJ1ks1vfSdZ%2BeNlo%3D&reserved=0 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 <wangyunjian at huawei.com>
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 <wangyunjian at huawei.com>
Acked-by: Ravi Kumar <ravi1.kumar at amd.com>
---
 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 <wangyunjian at huawei.com>
 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 at dpdk.org

 Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
 Acked-by: Ravi Kumar <ravi1.kumar at amd.com>


More information about the stable mailing list