No description
Find a file
Alexey Kardashevskiy 059e68da31 tracepoint: Fix race between tracing and removing tracepoint
commit c8b186a8d5 upstream.

When executing a tracepoint, the tracepoint's func is dereferenced twice -
in __DO_TRACE() (where the returned pointer is checked) and later on in
__traceiter_##_name where the returned pointer is dereferenced without
checking which leads to races against tracepoint_removal_sync() and
crashes.

This adds a check before referencing the pointer in tracepoint_ptr_deref.

Link: https://lkml.kernel.org/r/20210202072326.120557-1-aik@ozlabs.ru

Cc: stable@vger.kernel.org
Fixes: d25e37d89d ("tracepoint: Optimize using static_call()")
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-02-10 09:29:16 +01:00
arch
block
certs
crypto
Documentation ovl: implement volatile-specific fsync error behaviour 2021-02-10 09:29:16 +01:00
drivers gpiolib: free device name on error path to fix kmemleak 2021-02-10 09:29:16 +01:00
fs ovl: implement volatile-specific fsync error behaviour 2021-02-10 09:29:16 +01:00
include tracepoint: Fix race between tracing and removing tracepoint 2021-02-10 09:29:16 +01:00
init fgraph: Initialize tracing_graph_pause at task creation 2021-02-10 09:29:16 +01:00
ipc
kernel tracing: Use pause-on-trace with the latency tracers 2021-02-10 09:29:16 +01:00
lib
LICENSES
mm
net mac80211: fix station rate table updates on assoc 2021-02-10 09:29:16 +01:00
samples
scripts
security
sound
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile kbuild: fix duplicated flags in DEBUG_CFLAGS 2021-02-10 09:29:15 +01:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.