Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2019-08-16 11:30:20 +0200
committerBorislav Petkov <bp@suse.de>2019-08-16 11:30:20 +0200
commit19b1b4784551a8ce70db99837314c21b72b55f49 (patch)
tree43b79c45b2c3c5954e0fdbe23806147b95e14b8a
parent118eeef9cc5531a2da7f529895a5b1341d5a7903 (diff)
x86/boot: Fix memory leak in default_get_smp_config()
(bsc#1114279). suse-commit: 648370e6ab5dfb25eb06916bc3b115ffdc8a87ba
-rw-r--r--arch/x86/kernel/mpparse.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index 5cbb3177ed17..2546efdb0cb7 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -542,17 +542,15 @@ void __init default_get_smp_config(unsigned int early)
* local APIC has default address
*/
mp_lapic_addr = APIC_DEFAULT_PHYS_BASE;
- return;
+ goto out;
}
pr_info("Default MP configuration #%d\n", mpf->feature1);
construct_default_ISA_mptable(mpf->feature1);
} else if (mpf->physptr) {
- if (check_physptr(mpf, early)) {
- early_memunmap(mpf, sizeof(*mpf));
- return;
- }
+ if (check_physptr(mpf, early))
+ goto out;
} else
BUG();
@@ -561,7 +559,7 @@ void __init default_get_smp_config(unsigned int early)
/*
* Only use the first configuration found.
*/
-
+out:
early_memunmap(mpf, sizeof(*mpf));
}