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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8431b227-d053-4a9a-a278-2a43753fdaf7@efficios.com>
Date:   Wed, 15 Nov 2023 10:34:16 -0500
From:   Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:     zhujun2 <zhujun2@...s.chinamobile.com>, shuah@...nel.org
Cc:     ivan.orlov0322@...il.com, linux-kselftest@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] selftests/media_tests: fix a resource leak

On 2023-11-14 04:38, zhujun2 wrote:
> The opened file should be closed in main(), otherwise resource
> leak will occur that this problem was discovered by code reading

Fixing resource leaks for one-off test cases (processes execute and
then immediately exit) seems to be something that would fit in the
definition of "trivial", so I would advise to perhaps send those
patches to kernel-janitors@...r.kernel.org ?

[...]

> +
> +	close(fd);

These added calls to close(2) miss handling of possible close errors
(check return value and use errno to print an error).

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ