Commit e1a1ccef authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'livepatching-for-6.2' of...

Merge tag 'livepatching-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching

Pull livepatching update from Petr Mladek:

 - code cleanup

* tag 'livepatching-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching:
  livepatch: Move the result-invariant calculation out of the loop
parents a312a8cc 53910ef7
...@@ -196,9 +196,6 @@ static int klp_check_stack_func(struct klp_func *func, unsigned long *entries, ...@@ -196,9 +196,6 @@ static int klp_check_stack_func(struct klp_func *func, unsigned long *entries,
struct klp_ops *ops; struct klp_ops *ops;
int i; int i;
for (i = 0; i < nr_entries; i++) {
address = entries[i];
if (klp_target_state == KLP_UNPATCHED) { if (klp_target_state == KLP_UNPATCHED) {
/* /*
* Check for the to-be-unpatched function * Check for the to-be-unpatched function
...@@ -227,6 +224,9 @@ static int klp_check_stack_func(struct klp_func *func, unsigned long *entries, ...@@ -227,6 +224,9 @@ static int klp_check_stack_func(struct klp_func *func, unsigned long *entries,
} }
} }
for (i = 0; i < nr_entries; i++) {
address = entries[i];
if (address >= func_addr && address < func_addr + func_size) if (address >= func_addr && address < func_addr + func_size)
return -EAGAIN; return -EAGAIN;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment