diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2008-05-21 13:37:29 +0200 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-06-06 20:08:26 +0200 |
commit | 74b6b522ec83f9c44fc7743f2adcb24664aa8f45 (patch) | |
tree | 8e50f409eaf8b906d2fca6cf45cdbf8c7812bf83 /include/asm-mips/bcache.h | |
parent | KVM: s390: use yield instead of schedule to implement diag 0x44 (diff) | |
download | linux-74b6b522ec83f9c44fc7743f2adcb24664aa8f45.tar.xz linux-74b6b522ec83f9c44fc7743f2adcb24664aa8f45.zip |
KVM: s390: fix locking order problem in enable_sie
There are potential locking problem in enable_sie. We take the task_lock
and the mmap_sem. As exit_mm uses the same locks vice versa, this triggers
a lockdep warning.
The second problem is that dup_mm and mmput might sleep, so we must not
hold the task_lock at that moment.
The solution is to dup the mm unconditional and use the task_lock before and
afterwards to check if we can use the new mm. dup_mm and mmput are called
outside the task_lock, but we run update_mm while holding the task_lock,
protection us against ptrace.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include/asm-mips/bcache.h')
0 files changed, 0 insertions, 0 deletions