Author: mjones
Date: Mon Jan 31 22:16:48 2011
New Revision: 6323
URL: https://tracker.coreboot.org/trac/coreboot/changeset/6323

Log:
Fix an infinite loop in pnp_get_ioresource(), which freezes coreboot if
a rare condition arises.

Based on findings by Alexandru Gagniuc <[email protected]>

Signed-off-by: Stefan Reinauer <[email protected]>

Acked-by: Alexandru Gagniuc <[email protected]>

Modified:
   trunk/src/devices/pnp_device.c

Modified: trunk/src/devices/pnp_device.c
==============================================================================
--- trunk/src/devices/pnp_device.c      Mon Jan 31 22:14:02 2011        (r6322)
+++ trunk/src/devices/pnp_device.c      Mon Jan 31 22:16:48 2011        (r6323)
@@ -170,6 +170,12 @@
        struct resource *resource;
        unsigned moving, gran, step;
 
+       if (!info->mask) {
+               printk(BIOS_ERR, "ERROR: device %s index %d has no mask.\n",
+                               dev_path(dev), index);
+               return;
+       }
+
        resource = new_resource(dev, index);
 
        /* Initilize the resource. */

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to