File 26736-ACPI-APEI-Unlock-apei_iomaps_lock-on-error-path.patch of Package xen

References: bnc#785211

# Commit 0611689d9153227831979c7bafe594214b8505a3
# Date 2013-03-22 09:43:38 +0100
# Author Andrew Cooper <andrew.cooper3@citrix.com>
# Committer Jan Beulich <jbeulich@suse.com>
ACPI/APEI: Unlock apei_iomaps_lock on error path

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>

--- a/xen/drivers/acpi/apei/apei-io.c
+++ b/xen/drivers/acpi/apei/apei-io.c
@@ -146,10 +146,8 @@ static void __init apei_post_unmap(paddr
 
 	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);
openSUSE Build Service is sponsored by