]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ftrace/x86: Anotate text_mutex split between ftrace_arch_code_modify_post_process...
authorJiri Kosina <jkosina@suse.cz>
Sat, 29 Jun 2019 21:22:33 +0000 (23:22 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 7 Apr 2020 08:52:45 +0000 (10:52 +0200)
commitcfc54aebd78665418a714f3d9680138721b8a0e6
tree5fa23c4c34dbdadf37033ab6e9098a4d58627413
parent5df4168bf737448106403450f36221399a04bc1e
ftrace/x86: Anotate text_mutex split between ftrace_arch_code_modify_post_process() and ftrace_arch_code_modify_prepare()

BugLink: https://bugs.launchpad.net/bugs/1870604
commit 074376ac0e1d1fcd4fafebca86ee6158e7c20680 upstream.

ftrace_arch_code_modify_prepare() is acquiring text_mutex, while the
corresponding release is happening in ftrace_arch_code_modify_post_process().

This has already been documented in the code, but let's also make the fact
that this is intentional clear to the semantic analysis tools such as sparse.

Link: http://lkml.kernel.org/r/nycvar.YFH.7.76.1906292321170.27227@cbobk.fhfr.pm
Fixes: 39611265edc1a ("ftrace/x86: Add a comment to why we take text_mutex in ftrace_arch_code_modify_prepare()")
Fixes: d5b844a2cf507 ("ftrace/x86: Remove possible deadlock between register_kprobe() and ftrace_run_update_code()")
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/x86/kernel/ftrace.c