Showing error 1781

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: arch/x86/kernel/efi.c
Line in file: 354
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-11 08:47:26 UTC


Source:

324                       efi.systab->hdr.revision >> 16,
325                       efi.systab->hdr.revision & 0xffff);
326
327        /*
328         * Show what we know for posterity
329         */
330        c16 = tmp = early_ioremap(efi.systab->fw_vendor, 2);
331        if (c16) {
332                for (i = 0; i < sizeof(vendor) && *c16; ++i)
333                        vendor[i] = *c16++;
334                vendor[i] = '\0';
335        } else
336                printk(KERN_ERR PFX "Could not map the firmware vendor!\n");
337        early_iounmap(tmp, 2);
338
339        printk(KERN_INFO "EFI v%u.%.02u by %s \n",
340               efi.systab->hdr.revision >> 16,
341               efi.systab->hdr.revision & 0xffff, vendor);
342
343        /*
344         * Let's see what config tables the firmware passed to us.
345         */
346        config_tables = early_ioremap(
347                efi.systab->tables,
348                efi.systab->nr_tables * sizeof(efi_config_table_t));
349        if (config_tables == NULL)
350                printk(KERN_ERR "Could not map EFI Configuration Table!\n");
351
352        printk(KERN_INFO);
353        for (i = 0; i < efi.systab->nr_tables; i++) {
354                if (!efi_guidcmp(config_tables[i].guid, MPS_TABLE_GUID)) {
355                        efi.mps = config_tables[i].table;
356                        printk(" MPS=0x%lx ", config_tables[i].table);
357                } else if (!efi_guidcmp(config_tables[i].guid,
358                                        ACPI_20_TABLE_GUID)) {
359                        efi.acpi20 = config_tables[i].table;
360                        printk(" ACPI 2.0=0x%lx ", config_tables[i].table);
361                } else if (!efi_guidcmp(config_tables[i].guid,
362                                        ACPI_TABLE_GUID)) {
363                        efi.acpi = config_tables[i].table;
364                        printk(" ACPI=0x%lx ", config_tables[i].table);
Show full sources