| 8c8fe5c7 | 04-Jul-2026 |
Malaya Kumar Rout <malayarout91@gmail.com> |
selftests/statmount: Fix file descriptor leak in setup_namespace
In setup_namespace(), f_mountinfo is opened with fopen() at line 115 but is never closed. Multiple ksft_exit_fail_msg() calls exit th
selftests/statmount: Fix file descriptor leak in setup_namespace
In setup_namespace(), f_mountinfo is opened with fopen() at line 115 but is never closed. Multiple ksft_exit_fail_msg() calls exit the program without closing this file descriptor, and the cleanup_namespace() function registered with atexit() also doesn't close it.
Add fclose(f_mountinfo) in cleanup_namespace() to ensure the file descriptor is properly closed on both normal and error exit paths, since cleanup_namespace() is already registered as an atexit handler.
Signed-off-by: Malaya Kumar Rout <malayarout91@gmail.com> Link: https://patch.msgid.link/20260704120437.99851-1-malayarout91@gmail.com Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
show more ...
|
| e2f718e2 | 24-Jun-2024 |
Josef Bacik <josef@toxicpanda.com> |
sefltests: extend the statmount test for mount options
Now that we support exporting mount options, via statmount(), add a test to validate that it works.
Signed-off-by: Josef Bacik <josef@toxicpan
sefltests: extend the statmount test for mount options
Now that we support exporting mount options, via statmount(), add a test to validate that it works.
Signed-off-by: Josef Bacik <josef@toxicpanda.com> Link: https://lore.kernel.org/r/cabe09f0933d9c522da6e7b6cc160254f4f6c3b9.1719257716.git.josef@toxicpanda.com Reviewed-by: Jeff Layton <jlayton@kernel.org> [brauner: simplify and fix] Signed-off-by: Christian Brauner <brauner@kernel.org>
show more ...
|