Skip to content

Conversation

alexlarsson
Copy link
Member

The code in get_kernel_from_tree_usrlib_modules() that checks for an "aboot.cfg" does nothing with it (and in fact may leak the fd in case its there). In practice, /usr/lib/modules never has an aboot.cfg, so this is just completely dead code.

The code in get_kernel_from_tree_usrlib_modules() that checks for an
"aboot.cfg" does nothing with it (and in fact may leak the fd in case
its there). In practice, /usr/lib/modules never has an aboot.cfg, so
this is just completely dead code.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes a small block of dead code from get_kernel_from_tree_usrlib_modules(). The removed code was checking for an aboot.cfg file in /usr/lib/modules, but this file is not expected there and the check did nothing with the file if found. As the pull request description correctly points out, this could also lead to a file descriptor leak. The change is correct and improves code quality by removing unused and potentially buggy code. I have no further comments.

@cgwalters cgwalters enabled auto-merge August 6, 2025 14:12
@cgwalters cgwalters merged commit 88f1176 into ostreedev:main Aug 6, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants