Linux EFI development
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: matthew.garrett-05XSO3Yj/JvQT0dZR+AlfA@public.gmane.org
Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: re: EFI: Stash ROMs if they're not in the PCI BAR
Date: Fri, 15 Mar 2013 11:29:28 +0300	[thread overview]
Message-ID: <20130315082928.GA14520@longonot.mountain> (raw)

Hello Matthew Garrett,

The patch dd5fc854de5f: "EFI: Stash ROMs if they're not in the PCI 
BAR" from Dec 5, 2012, leads to the following warning:
"arch/x86/boot/compressed/eboot.c:290 setup_efi_pci()
	 error: potentially dereferencing uninitialized 'pci_handle'."

  254  static efi_status_t setup_efi_pci(struct boot_params *params)
  255  {
  256          efi_pci_io_protocol *pci;
  257          efi_status_t status;
  258          void **pci_handle;
  259          efi_guid_t pci_proto = EFI_PCI_IO_PROTOCOL_GUID;
  260          unsigned long nr_pci, size = 0;
  261          int i;
  262          struct setup_data *data;
  263  
  264          data = (struct setup_data *)(unsigned long)params->hdr.setup_data;
  265  
  266          while (data && data->next)
  267                  data = (struct setup_data *)(unsigned long)data->next;
  268  
  269          status = efi_call_phys5(sys_table->boottime->locate_handle,
  270                                  EFI_LOCATE_BY_PROTOCOL, &pci_proto,
  271                                  NULL, &size, pci_handle);
                                                    ^^^^^^^^^^
This hasn't been initialized yet.

  272  
  273          if (status == EFI_BUFFER_TOO_SMALL) {
  274                  status = efi_call_phys3(sys_table->boottime->allocate_pool,
  275                                          EFI_LOADER_DATA, size, &pci_handle);
  276  

regards,
dan carpenter

             reply	other threads:[~2013-03-15  8:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15  8:29 Dan Carpenter [this message]
     [not found] ` <20130315082928.GA14520-dZEljifmRObu9KfB+GxooP8+0UxHXcjY@public.gmane.org>
2013-03-15  8:57   ` EFI: Stash ROMs if they're not in the PCI BAR David Woodhouse
     [not found]     ` <1363337872.2444.9.camel-Fexsq3y4057IgHVZqg5X0TlWvGAXklZc@public.gmane.org>
2013-03-18 11:36       ` Matt Fleming
     [not found]         ` <1363606563.15011.333.camel-ZqTwcBeJ+wsBof6jY8KHXm7IUlhRatedral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-03-18 16:02           ` Matthew Garrett
     [not found]             ` <1363622520.2553.8.camel-tCUS0Eywp2Pehftex57rkxo58HMYffqeLoYNBG0abjxeoWH0uzbU5w@public.gmane.org>
2013-03-20  8:44               ` Matt Fleming
     [not found]                 ` <514976F3.2-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2013-03-20  9:09                   ` Dan Carpenter
2013-03-20  9:27               ` David Woodhouse

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=20130315082928.GA14520@longonot.mountain \
    --to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matthew.garrett-05XSO3Yj/JvQT0dZR+AlfA@public.gmane.org \
    /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