Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f86c9747 authored by Sonny Rao's avatar Sonny Rao Committed by Paul Mackerras
Browse files

[POWERPC] Fix idr locking in init_new_context



We always need to serialize accesses to mmu_context_idr.

I hit this bug when testing with a small number of mmu contexts.

Signed-off-by: default avatarSonny Rao <sonny@burdell.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 975b3658
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -44,7 +44,9 @@ again:
		return err;

	if (index > MAX_CONTEXT) {
		spin_lock(&mmu_context_lock);
		idr_remove(&mmu_context_idr, index);
		spin_unlock(&mmu_context_lock);
		return -ENOMEM;
	}