init: do_mounts: use kmalloc() for allocations of temporary buffers#1436
Open
vfsci-bot[bot] wants to merge 1 commit into
Open
init: do_mounts: use kmalloc() for allocations of temporary buffers#1436vfsci-bot[bot] wants to merge 1 commit into
vfsci-bot[bot] wants to merge 1 commit into
Conversation
Several places in init/do_mounts.c allocate temporary buffers for filesystem names or options using __get_free_page() or alloc_page(). Usage of alloc_page() APIs is not required there and only creates unnecessary noise with castings or conversion from struct page to void *. kmalloc() is a better API for these uses and it also provides better scalability and more debugging possibilities. Replace use of __get_free_page() and alloc_page() with kmalloc(). While on it, add a check for -ENOMEM condition in mount_root_generic(). Link: https://lore.kernel.org/all/635405e4-9423-4a25-a6e7-e03c8ea0bcbe@redhat.com Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Series: https://patchwork.kernel.org/project/linux-fsdevel/list/?series=1097841
Submitter: Mike Rapoport
Version: 1
Patches: 1/1
Message-ID:
<20260520-init-v1-1-aaf2ebac5ad9@kernel.org>Base: vfs.base.ci
Lore: https://lore.kernel.org/linux-fsdevel/20260520-init-v1-1-aaf2ebac5ad9@kernel.org
Automated by ml2pr