summaryrefslogtreecommitdiff
path: root/drivers/firmware/efi/libstub/efi-stub-helper.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2020-05-19 11:43:01 +0300
committerArd Biesheuvel <ardb@kernel.org>2020-05-22 18:05:08 +0300
commit27cd5511feffea3956d081585316272795e45bce (patch)
tree20af23299bc6873cfb18ab941d3ae13e1ad3f0cf /drivers/firmware/efi/libstub/efi-stub-helper.c
parent80b1bfe1cb2f20225fb2d8f11d44af4a9d765396 (diff)
downloadlinux-27cd5511feffea3956d081585316272795e45bce.tar.xz
efi/libstub: Use pool allocation for the command line
Now that we removed the memory limit for the allocation of the command line, there is no longer a need to use the page based allocator so switch to a pool allocation instead. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/libstub/efi-stub-helper.c')
-rw-r--r--drivers/firmware/efi/libstub/efi-stub-helper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/firmware/efi/libstub/efi-stub-helper.c b/drivers/firmware/efi/libstub/efi-stub-helper.c
index dbfaf8dcdda2..89f075275300 100644
--- a/drivers/firmware/efi/libstub/efi-stub-helper.c
+++ b/drivers/firmware/efi/libstub/efi-stub-helper.c
@@ -212,8 +212,7 @@ efi_status_t efi_parse_options(char const *cmdline)
* Size of memory allocated return in *cmd_line_len.
* Returns NULL on error.
*/
-char *efi_convert_cmdline(efi_loaded_image_t *image,
- int *cmd_line_len, unsigned long max_addr)
+char *efi_convert_cmdline(efi_loaded_image_t *image, int *cmd_line_len)
{
const u16 *s2;
unsigned long cmdline_addr = 0;
@@ -275,7 +274,8 @@ char *efi_convert_cmdline(efi_loaded_image_t *image,
options_bytes++; /* NUL termination */
- status = efi_allocate_pages(options_bytes, &cmdline_addr, max_addr);
+ status = efi_bs_call(allocate_pool, EFI_LOADER_DATA, options_bytes,
+ (void **)&cmdline_addr);
if (status != EFI_SUCCESS)
return NULL;