diff options
| author | Guilherme Giacomo Simoes <trintaeoitogc@gmail.com> | 2026-05-03 16:16:09 -0300 |
|---|---|---|
| committer | Thomas Gleixner <tglx@kernel.org> | 2026-05-19 16:36:34 +0200 |
| commit | b088fe35019433541225d315263d8477899e0657 (patch) | |
| tree | ca09b20cb5ebdb88d2e273910cd3c2bb99a0bf01 /scripts/checkstack.pl | |
| parent | 5200f5f493f79f14bbdc349e402a40dfb32f23c8 (diff) | |
x86/vdso: Fix incorrect size in munmap() on map_vdso() failure
In map_vdso(), if a failure occurs during the installation of the VVAR
mappings, the error path attempts to clean up previously allocated mappings
using do_munmap(). However, the cleanup for the VVAR mapping is incorrectly
using image->size (the size of the vDSO text) instead of the actual size
allocated for the VVAR area.
Replace the incorrect do_munmap() image->size parameter with the constant
VDSO_NR_PAGES * PAGE_SIZE. Ensure the unmap size exactly matches the size
used during the vdso_install_vvar_mapping() phase to provide a symmetrical
and complete teardown of the memory region.
Fixes: e93d2521b27f ("x86/vdso: Split virtual clock pages into dedicated mapping")
Signed-off-by: Guilherme Giacomo Simoes <trintaeoitogc@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://patch.msgid.link/20260503191609.551817-1-trintaeoitogc@gmail.com
Diffstat (limited to 'scripts/checkstack.pl')
0 files changed, 0 insertions, 0 deletions
