lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 29 Oct 2019 11:09:55 +0530
From:   Kishon Vijay Abraham I <kishon@...com>
To:     Hewenliang <hewenliang4@...wei.com>, <lorenzo.pieralisi@....com>,
        <linux-pci@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <bhelgaas@...gle.com>
CC:     <linfeilong@...wei.com>
Subject: Re: [PATCH] tools: PCI: Fix fd leakage



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@...wei.com>

Acked-by: Kishon Vijay Abraham I <kishon@...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 */
>  }
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ