]> git.baikalelectronics.ru Git - kernel.git/commit
s390/gmap: return proper error code on ksm unsharing
authorChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 27 Mar 2020 07:06:42 +0000 (08:06 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 27 Mar 2020 10:42:53 +0000 (06:42 -0400)
commit442e4b20ced5968e0f1cebd6bcf62626a8709fd2
tree15c690814a85cacbcfe58c052d5b058e64c8cab0
parentccc1f88db27dbb31d7b5189fd35f1f63cd944d4d
s390/gmap: return proper error code on ksm unsharing

If a signal is pending we might return -ENOMEM instead of -EINTR.
We should propagate the proper error during KSM unsharing.
unmerge_ksm_pages returns -ERESTARTSYS on signal_pending. This gets
translated by entry.S to -EINTR. It is important to get this error
code so that userspace can retry.

To make this clearer we also add -EINTR to the documentation of the
PV_ENABLE call, which calls unmerge_ksm_pages.

Fixes: 778a4889e5f3 ("s390/mm: disable KSM for storage key enabled pages")
Reviewed-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Tested-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Documentation/virt/kvm/api.rst
arch/s390/mm/gmap.c