]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Make splice_read available again
authorSung-hun Kim <sfoon.kim@samsung.com>
Tue, 14 Mar 2023 01:37:07 +0000 (10:37 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:33:59 +0000 (13:33 +0100)
commitc008beb34430e5119bb7f2b276056d7d4e515a39
treedddd45e49871ca8f5ab363930a2d1384b67d06ee
parent6ad7b410005ea6aa1793281a4cb73dbccc4f1fa7
tracing: Make splice_read available again

commit 4e7cf736d1451ea1ea90b4f2b28f68ec5b31c14e upstream.

Since the commit ec25677859f2 ("fs: don't allow splice read/write
without explicit ops") is applied to the kernel, splice() and
sendfile() calls on the trace file (/sys/kernel/debug/tracing
/trace) return EINVAL.

This patch restores these system calls by initializing splice_read
in file_operations of the trace file. This patch only enables such
functionalities for the read case.

Link: https://lore.kernel.org/linux-trace-kernel/20230314013707.28814-1-sfoon.kim@samsung.com
Cc: stable@vger.kernel.org
Fixes: ec25677859f2 ("fs: don't allow splice read/write without explicit ops")
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/trace.c