diff options
author | Christian Borntraeger | 2008-05-21 13:37:29 +0200 |
---|---|---|
committer | Avi Kivity | 2008-06-06 21:08:26 +0300 |
commit | 74b6b522ec83f9c44fc7743f2adcb24664aa8f45 (patch) | |
tree | 8e50f409eaf8b906d2fca6cf45cdbf8c7812bf83 /drivers/s390 | |
parent | b8cee18cc75d7b9dbe6c6526dfae9ab49e84fa95 (diff) |
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 'drivers/s390')
0 files changed, 0 insertions, 0 deletions