Skip to content

Commit

Permalink
[S390] extmem unbalanced spin_lock.
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Dec 4, 2006
1 parent 645c98c commit 6b4044b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/s390/mm/extmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 linux390@de.ibm.com\n",name);
return;
PRINT_ERR("could not find segment %s in segment_save, please "
"report to linux390@de.ibm.com\n", name);
goto out;
}

startpfn = seg->start_addr >> PAGE_SHIFT;
Expand Down

0 comments on commit 6b4044b

Please sign in to comment.