On 2023-11-20 16:46, Peter Zijlstra wrote:
On Mon, Nov 20, 2023 at 03:54:18PM -0500, Mathieu Desnoyers wrote:
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index de753403cdaf..718a0723a0bc 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -299,27 +299,33 @@ static void ftrace_syscall_enter(void *data, struct pt_regs *regs, long id)
int syscall_nr;
int size;
+ /*
+ * Probe called with preemption enabled (may_fault), but ring buffer and
+ * per-cpu data require preemption to be disabled.
+ */
+ preempt_disable_notrace();
guard(preempt_notrace)();
and ditch all the goto crap.
[ more guard stuff ]
Sure, will do, thanks!
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com