KVM: s390: correct locking for s390_enable_skey
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 16 May 2014 08:34:11 +0000 (10:34 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 16 May 2014 12:57:17 +0000 (14:57 +0200)
Use the mm semaphore to serialize multiple invocations of s390_enable_skey.
The second CPU faulting on a storage key operation needs to wait for the
completion of the page table update. Taking the mm semaphore writable
has the positive side-effect that it prevents any host faults from
taking place which does have implications on keys vs PGSTE.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>

No differences found