Skip to contentSkip to conversation

extmem unbalanced spin_lock.

S390 Martin Schwidefsky 1 participant 1 message Dec 4, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

From: Heiko Carstens <[email protected]>

[S390] extmem unbalanced spin_lock.

segment save will exit with a lock held if the passed segment doesn't exist. Any subsequent call to segment_save will lead to a deadlock. Fix this and give up the lock before returning.

---

 arch/s390/mm/extmem.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
arch/s390/mm/extmem.c +3 -2
diff -urpN linux-2.6/arch/s390/mm/extmem.c linux-2.6-patched/arch/s390/mm/extmem.c
@@ -563,8 +563,9 @@ segment_save(char *name)
 	seg = segment_by_name (name);
 
 	if (seg == NULL) {
-		PRINT_ERR ("could not find segment %s in segment_save, please report to [email protected]\n",name);
-		return;
+		PRINT_ERR("could not find segment %s in segment_save, please "
+			  "report to [email protected]\n", name);
+		goto out;
 	}
 
 	startpfn = seg->start_addr >> PAGE_SHIFT;