]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
uprobes: Use synchronize_rcu() not synchronize_sched()
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 9 Aug 2018 19:37:59 +0000 (15:37 -0400)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:45:50 +0000 (19:45 -0600)
commit406f4f983d6f869c66f3582ede5eac26fc07674d
tree946d052ad7cbf1b89809550dcd9327329840316c
parentae3d68d0bd6be5eefe25b6ea05f030082da81be9
uprobes: Use synchronize_rcu() not synchronize_sched()

BugLink: https://bugs.launchpad.net/bugs/1835972
commit 016f8ffc48cb01d1e7701649c728c5d2e737d295 upstream.

While debugging another bug, I was looking at all the synchronize*()
functions being used in kernel/trace, and noticed that trace_uprobes was
using synchronize_sched(), with a comment to synchronize with
{u,ret}_probe_trace_func(). When looking at those functions, the data is
protected with "rcu_read_lock()" and not with "rcu_read_lock_sched()". This
is using the wrong synchronize_*() function.

Link: http://lkml.kernel.org/r/20180809160553.469e1e32@gandalf.local.home
Cc: stable@vger.kernel.org
Fixes: 70ed91c6ec7f8 ("tracing/uprobes: Support ftrace_event_file base multibuffer")
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
kernel/trace/trace_uprobe.c