]> xenbits.xensource.com Git - xen.git/commitdiff
ACPI/APEI: Unlock apei_iomaps_lock on error path
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 22 Mar 2013 08:43:38 +0000 (09:43 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 22 Mar 2013 08:43:38 +0000 (09:43 +0100)
This causes deadlocks during early boot on hardware with broken/buggy
APEI implementations, such as a Dell Poweredge 2950 with the latest
currently available BIOS.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Don't use goto or another special error path, as handling the error
case in normal flow is quite simple.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/acpi/apei/apei-io.c

index d57035bb5d01657257df39d617acfee3aacb8c16..f0f4636b19286f8193d87ce9c13056d799a9e7b1 100644 (file)
@@ -146,10 +146,8 @@ static void __init apei_post_unmap(paddr_t paddr, unsigned long size)
 
        spin_lock_irqsave(&apei_iomaps_lock, flags);
        map = __apei_find_iomap(paddr, size);
-       if (!map)
-               return;
-
-       list_del(&map->list);
+       if (map)
+               list_del(&map->list);
        spin_unlock_irqrestore(&apei_iomaps_lock, flags);
 
        xfree(map);