Skip to content

Commit 1117e41

Browse files
Vasily Gorbikgregkh
Vasily Gorbik
authored andcommitted
s390/mm: correct allocate_pgste proc_handler callback
[ Upstream commit 5bedf8a ] Since proc_dointvec does not perform value range control, proc_dointvec_minmax should be used to limit value range, which is clearly intended here, as the internal representation of the value: unsigned int alloc_pgste:1; In fact it currently works, since we have mm->context.alloc_pgste = page_table_allocate_pgste || ... ... since commit 23fefe1 ("s390/kvm: avoid global config of vm.alloc_pgste=1") Before that it was mm->context.alloc_pgste = page_table_allocate_pgste; which was broken. That was introduced with commit 0b46e0a ("s390/kvm: remove delayed reallocation of page tables for KVM"). Fixes: 0b46e0a ("s390/kvm: remove delayed reallocation of page tables for KVM") Acked-by: Christian Borntraeger <[email protected]> Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent bc4ce06 commit 1117e41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/s390/mm/pgalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static struct ctl_table page_table_sysctl[] = {
2727
.data = &page_table_allocate_pgste,
2828
.maxlen = sizeof(int),
2929
.mode = S_IRUGO | S_IWUSR,
30-
.proc_handler = proc_dointvec,
30+
.proc_handler = proc_dointvec_minmax,
3131
.extra1 = &page_table_allocate_pgste_min,
3232
.extra2 = &page_table_allocate_pgste_max,
3333
},

0 commit comments

Comments
 (0)