aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/alternative.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 3c13284ff86..e63b80e5861 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -395,12 +395,14 @@ int alternatives_text_reserved(void *start, void *end)
{
struct smp_alt_module *mod;
u8 **ptr;
+ u8 *text_start = start;
+ u8 *text_end = end;
list_for_each_entry(mod, &smp_alt_modules, next) {
- if (mod->text > end || mod->text_end < start)
+ if (mod->text > text_end || mod->text_end < text_start)
continue;
for (ptr = mod->locks; ptr < mod->locks_end; ptr++)
- if (start <= *ptr && end >= *ptr)
+ if (text_start <= *ptr && text_end >= *ptr)
return 1;
}