]> git.baikalelectronics.ru Git - kernel.git/commit
livepatch: __klp_disable_patch() should never be called for disabled patches
authorPetr Mladek <pmladek@suse.com>
Fri, 20 Oct 2017 14:56:51 +0000 (16:56 +0200)
committerJiri Kosina <jkosina@suse.cz>
Thu, 26 Oct 2017 12:58:50 +0000 (14:58 +0200)
commit09f4d608e70736e5ac36a6eb8ffc0d7e723c7d16
tree55d3fd12dba578268abe0b95e46db6f2d6e86034
parenteeee2081f7738b519340e59b06b23761d26d38f1
livepatch: __klp_disable_patch() should never be called for disabled patches

__klp_disable_patch() should never be called when the patch is not
enabled. Let's add the same warning that we have in __klp_enable_patch().

This allows to remove the check when calling klp_pre_unpatch_callback().
It was strange anyway because it repeatedly checked per-patch flag
for each patched object.

Signed-off-by: Petr Mladek <pmladek@suse.com>
Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
kernel/livepatch/core.c