No description
Find a file
Steven Rostedt (VMware) 8c9af478c0 ftrace: Handle commands when closing set_ftrace_filter file
# echo switch_mm:traceoff > /sys/kernel/tracing/set_ftrace_filter

will cause switch_mm to stop tracing by the traceoff command.

 # echo -n switch_mm:traceoff > /sys/kernel/tracing/set_ftrace_filter

does nothing.

The reason is that the parsing in the write function only processes
commands if it finished parsing (there is white space written after the
command). That's to handle:

 write(fd, "switch_mm:", 10);
 write(fd, "traceoff", 8);

cases, where the command is broken over multiple writes.

The problem is if the file descriptor is closed, then the write call is
not processed, and the command needs to be processed in the release code.
The release code can handle matching of functions, but does not handle
commands.

Cc: stable@vger.kernel.org
Fixes: eda1e32855 ("tracing: handle broken names in ftrace filter")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2021-05-05 10:38:24 -04:00
arch tracing: Fix various typos in comments 2021-03-23 14:08:18 -04:00
block block: Discard page cache of zone reset target range 2021-03-11 11:49:25 -07:00
certs
crypto
Documentation A set of irqchip updates: 2021-03-14 13:33:33 -07:00
drivers A set of irqchip updates: 2021-03-14 13:33:33 -07:00
fs tracing: Fix various typos in comments 2021-03-23 14:08:18 -04:00
include tracing: Remove unused argument from "ring_buffer_time_stamp() 2021-04-01 14:18:32 -04:00
init bootconfig: Update prototype of setup_boot_config() 2021-03-18 12:58:26 -04:00
ipc
kernel ftrace: Handle commands when closing set_ftrace_filter file 2021-05-05 10:38:24 -04:00
lib kasan: fix KASAN_STACK dependency for HW_TAGS 2021-03-13 11:27:31 -08:00
LICENSES
mm Merge branch 'akpm' (patches from Andrew) 2021-03-14 12:23:34 -07:00
net NFS Client Bugfixes for Linux 5.10-rc3 2021-03-12 14:19:35 -08:00
samples
scripts scripts/recordmcount.pl: Make vim and emacs indent the same 2021-03-22 17:51:16 -04:00
security Revert 95ebabde38 ("capabilities: Don't allow writing ambiguous v3 file capabilities") 2021-03-12 15:27:14 -06:00
sound
tools tools/latency-collector: Remove unneeded semicolon 2021-03-18 12:58:26 -04:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Merge branch 'akpm' (patches from Andrew) 2021-03-14 12:23:34 -07:00
Makefile Linux 5.12-rc3 2021-03-14 14:41:02 -07: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.