From: Kishon Vijay Abraham I <kishon@ti.com>
To: Hewenliang <hewenliang4@huawei.com>, <lorenzo.pieralisi@arm.com>,
<linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<bhelgaas@google.com>
Cc: <linfeilong@huawei.com>
Subject: Re: [PATCH] tools: PCI: Fix fd leakage
Date: Tue, 29 Oct 2019 11:09:55 +0530 [thread overview]
Message-ID: <d384da9a-c417-fb5f-2881-b3039af0e997@ti.com> (raw)
In-Reply-To: <20191026013555.61016-1-hewenliang4@huawei.com>
On 26/10/19 7:05 AM, Hewenliang wrote:
> We should close fd before the return of run_test.
>
> Fixes: 3f2ed8134834 ("tools: PCI: Add a userspace tool to test PCI endpoint")
> Signed-off-by: Hewenliang <hewenliang4@huawei.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
> tools/pci/pcitest.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c
> index cb1e51fcc84e..32b7c6f9043d 100644
> --- a/tools/pci/pcitest.c
> +++ b/tools/pci/pcitest.c
> @@ -129,6 +129,7 @@ static int run_test(struct pci_test *test)
> }
>
> fflush(stdout);
> + close(fd);
> return (ret < 0) ? ret : 1 - ret; /* return 0 if test succeeded */
> }
>
>
next prev parent reply other threads:[~2019-10-29 5:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-26 1:35 Hewenliang
2019-10-29 5:39 ` Kishon Vijay Abraham I [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-10-26 1:33 Hewenliang
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=d384da9a-c417-fb5f-2881-b3039af0e997@ti.com \
--to=kishon@ti.com \
--cc=bhelgaas@google.com \
--cc=hewenliang4@huawei.com \
--cc=linfeilong@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.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
all inboxes | Powered by JetHome®