]> git.baikalelectronics.ru Git - kernel.git/commit
s390x/mm: cleanup gmap_pte_op_walk()
authorDavid Hildenbrand <david@redhat.com>
Fri, 10 Nov 2017 15:18:05 +0000 (16:18 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 16 Jan 2018 15:15:16 +0000 (16:15 +0100)
commit6d34d39f2e52da2109744a613dd83bb438242f35
treeb4f5560a0794b59a90cc2e060651a13f64077072
parentea68337e28b82c07e8a30cf1ca577c275fb830c6
s390x/mm: cleanup gmap_pte_op_walk()

gmap_mprotect_notify() refuses shadow gmaps. Turns out that
a) gmap_protect_range()
b) gmap_read_table()
c) gmap_pte_op_walk()

Are never called for gmap shadows. And never should be. This dates back
to gmap shadow prototypes where we allowed to call mprotect_notify() on
the gmap shadow (to get notified about the prefix pages getting removed).
This is avoided by always getting notified about any change on the gmap
shadow.

The only real function for walking page tables on shadow gmaps is
gmap_table_walk().

So, essentially, these functions should never get called and
gmap_pte_op_walk() can be cleaned up. Add some checks to callers of
gmap_pte_op_walk().

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20171110151805.7541-1-david@redhat.com>
Reviewed-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/mm/gmap.c