mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
[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: Sonny Rao <sonny@burdell.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
975b365895
commit
f86c9747fe
@ -44,7 +44,9 @@ again:
|
|||||||
return err;
|
return err;
|
||||||
|
|
||||||
if (index > MAX_CONTEXT) {
|
if (index > MAX_CONTEXT) {
|
||||||
|
spin_lock(&mmu_context_lock);
|
||||||
idr_remove(&mmu_context_idr, index);
|
idr_remove(&mmu_context_idr, index);
|
||||||
|
spin_unlock(&mmu_context_lock);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user