linux-brain/kernel/livepatch
Miroslav Benes 0f0ced702d livepatch: Nullify obj->mod in klp_module_coming()'s error path
[ Upstream commit 4ff96fb52c ]

klp_module_coming() is called for every module appearing in the system.
It sets obj->mod to a patched module for klp_object obj. Unfortunately
it leaves it set even if an error happens later in the function and the
patched module is not allowed to be loaded.

klp_is_object_loaded() uses obj->mod variable and could currently give a
wrong return value. The bug is probably harmless as of now.

Signed-off-by: Miroslav Benes <mbenes@suse.cz>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-10-07 18:57:10 +02:00
..
core.c livepatch: Nullify obj->mod in klp_module_coming()'s error path 2019-10-07 18:57:10 +02:00
core.h Merge branch 'for-linus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching 2017-11-15 10:21:58 -08:00
Kconfig livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS 2017-05-27 00:27:37 +02:00
Makefile livepatch: introduce shadow variable API 2017-09-14 23:06:12 +02:00
patch.c livepatch: add (un)patch callbacks 2017-10-19 10:08:56 +02:00
patch.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
shadow.c livepatch: Allow to call a custom callback when freeing shadow variables 2018-04-17 13:42:48 +02:00
transition.c livepatch: Remove reliable stacktrace check in klp_try_switch_task() 2018-07-16 17:50:33 +02:00
transition.h livepatch: force transition to finish 2017-12-07 13:21:35 +01:00