From: Dan Carpenter <dan.carpenter@oracle.com>
To: nivedita@alum.mit.edu
Cc: linux-efi@vger.kernel.org
Subject: [bug report] efi/libstub: Unify initrd loading across architectures
Date: Wed, 3 Jun 2020 13:05:01 +0300 [thread overview]
Message-ID: <20200603100501.GA1843390@mwanda> (raw)
Hello Arvind Sankar,
The patch f61900fd0ebf: "efi/libstub: Unify initrd loading across
architectures" from Apr 30, 2020, leads to the following static
checker warning:
drivers/firmware/efi/libstub/efi-stub-helper.c:481 efi_load_initrd_cmdline()
error: we previously assumed 'image' could be null (see line 474)
drivers/firmware/efi/libstub/efi-stub-helper.c
466 static
467 efi_status_t efi_load_initrd_cmdline(efi_loaded_image_t *image,
468 unsigned long *load_addr,
469 unsigned long *load_size,
470 unsigned long soft_limit,
471 unsigned long hard_limit)
472 {
473 if (!IS_ENABLED(CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER) ||
474 (IS_ENABLED(CONFIG_X86) && (!efi_is_native() || image == NULL))) {
^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
Assume X86 is not configured but "image" is NULL.
475 *load_addr = *load_size = 0;
476 return EFI_SUCCESS;
477 }
478
479 return handle_cmdline_files(image, L"initrd=", sizeof(L"initrd=") - 2,
^^^^^
Dereferenced inside the function.
480 soft_limit, hard_limit,
481 load_addr, load_size);
482 }
regards,
dan carpenter
next reply other threads:[~2020-06-03 10:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-03 10:05 Dan Carpenter [this message]
2020-06-03 10:26 ` [bug report] efi/libstub: Unify initrd loading across architectures Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200603100501.GA1843390@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-efi@vger.kernel.org \
--cc=nivedita@alum.mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox