diff options
| author | Heiko Carstens <hca@linux.ibm.com> | 2026-08-27 12:28:32 +0200 |
|---|---|---|
| committer | Heiko Carstens <hca@linux.ibm.com> | 2026-09-01 12:44:48 +0200 |
| commit | 33123ff9cbcb35640f56efb8ede1d6f0d97376fd (patch) | |
| tree | 0c3be0741ba79f4bee6cddcd1665cad3760921be /tools/perf/scripts/python/stackcollapse.py | |
| parent | 12373ea918a0e72483662095686556eea21d67bc (diff) | |
s390/mm: Simplify crst_table_upgrade()
In case of an upgrade from four to five level page tables, and a failing
pgd allocation, the exit path of crst_table_upgrade() would incorrectly
dereference the p4d NULL pointer via pagetable_dtor().
Address this by reworking crst_table_upgrade(), which basically is a
revert of [1]. Take into account that GFP_KERNEL order-2 allocation
failures are very unlikely. Therefore keep the code as simple as
possible:
In case of an upgrade from three to five levels, and an allocation
failure of the fifth page table level, keep the upgrade to four levels
instead of reverting back to three levels. This allows to keep error
handling minimal.
[1] commit 31932757c612 ("s390/mm: optimize page table upgrade routine")
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
