From dfc759227ae950272fc6106127746733a4277252 Mon Sep 17 00:00:00 2001 From: Josh Poimboeuf Date: Wed, 9 Jul 2014 15:06:57 -0500 Subject: [PATCH] kmod/core: check force flag in replace case When unpatching a function due to "kpatch replace", check the force flag before doing the activeness safety check. --- kmod/core/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmod/core/core.c b/kmod/core/core.c index c0da875..9381636 100644 --- a/kmod/core/core.c +++ b/kmod/core/core.c @@ -229,7 +229,7 @@ static void kpatch_backtrace_address_verify(void *data, unsigned long address, /* in the replace case, need to check the func hash as well */ hash_for_each_rcu(kpatch_func_hash, i, func, node) { - if (func->op == KPATCH_OP_UNPATCH) { + if (func->op == KPATCH_OP_UNPATCH && !func->force) { args->ret = kpatch_compare_addresses(address, func->new_addr, func->new_size,