patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Kumar, Ravi1" <Ravi1.Kumar@amd.com>
To: wangyunjian <wangyunjian@huawei.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "jerry.lilijun@huawei.com" <jerry.lilijun@huawei.com>,
	"xudingke@huawei.com" <xudingke@huawei.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] crypto/ccp: fix fd leak on probe failure
Date: Mon, 27 Apr 2020 04:10:54 +0000	[thread overview]
Message-ID: <DM6PR12MB298728938B459AEBD067751CAEAF0@DM6PR12MB2987.namprd12.prod.outlook.com> (raw)
In-Reply-To: <1587882975-13960-1-git-send-email-wangyunjian@huawei.com>

[AMD Public Use]

Acked-by: Ravi Kumar <ravi1.kumar@amd.com>
>-----Original Message-----
>From: wangyunjian <wangyunjian@huawei.com> 
>Sent: Sunday, April 26, 2020 12:06 PM
>To: dev@dpdk.org; Kumar, Ravi1 <Ravi1.Kumar@amd.com>
>Cc: jerry.lilijun@huawei.com; xudingke@huawei.com; Yunjian Wang <wangyunjian@huawei.com>; stable@dpdk.org
>Subject: [dpdk-dev] [PATCH] crypto/ccp: fix fd leak on probe failure
>
>
>From: Yunjian Wang <wangyunjian@huawei.com>
>
>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 <wangyunjian@huawei.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 80fe6a453..7d98b2eb2 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.19.1
>
>
>

  reply	other threads:[~2020-04-27  4:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-26  6:36 wangyunjian
2020-04-27  4:10 ` Kumar, Ravi1 [this message]
2020-05-09 21:52   ` Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR12MB298728938B459AEBD067751CAEAF0@DM6PR12MB2987.namprd12.prod.outlook.com \
    --to=ravi1.kumar@amd.com \
    --cc=dev@dpdk.org \
    --cc=jerry.lilijun@huawei.com \
    --cc=stable@dpdk.org \
    --cc=wangyunjian@huawei.com \
    --cc=xudingke@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).