Commit e1a1ccef authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
Loading
Loading
Loading
Loading
+27 −27
Original line number Diff line number Diff line
@@ -196,9 +196,6 @@ static int klp_check_stack_func(struct klp_func *func, unsigned long *entries,
	struct klp_ops *ops;
	int i;

	for (i = 0; i < nr_entries; i++) {
		address = entries[i];

	if (klp_target_state == KLP_UNPATCHED) {
		 /*
		  * Check for the to-be-unpatched function
@@ -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)
			return -EAGAIN;
	}