diff options
| author | Mike Rapoport (Microsoft) <rppt@kernel.org> | 2026-05-20 11:16:51 +0300 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-05-22 13:12:20 +0300 |
| commit | 3fb2d124b64716f16355b9b722b2f062c0702f24 (patch) | |
| tree | cb246abbd668a6737cb6ba1e0d25f708f41ed866 /scripts/Makefile.thinlto | |
| parent | 7dc6acb3d56bc2c5d119c86abd8fe96034084fc8 (diff) | |
| download | linux-3fb2d124b64716f16355b9b722b2f062c0702f24.tar.xz | |
init: do_mounts: use kmalloc() for allocations of temporary buffers
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>
Link: https://patch.msgid.link/20260520-init-v1-1-aaf2ebac5ad9@kernel.org
Reviewed-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
