[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240729122726.GA33588@noisy.programming.kicks-ass.net>
Date: Mon, 29 Jul 2024 14:27:26 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Radoslaw Zielonek <radoslaw.zielonek@...il.com>
Cc: rostedt@...dmis.org, mhiramat@...nel.org,
mathieu.desnoyers@...icios.com, mingo@...hat.com,
juri.lelli@...hat.com, vincent.guittot@...aro.org,
dietmar.eggemann@....com, bsegall@...gle.com, mgorman@...e.de,
vschneid@...hat.com, song@...nel.org, jolsa@...nel.org,
ast@...nel.org, daniel@...earbox.net, andrii@...nel.org,
martin.lau@...ux.dev, eddyz87@...il.com, yonghong.song@...ux.dev,
john.fastabend@...il.com, kpsingh@...nel.org, sdf@...ichev.me,
haoluo@...gle.com, mattbobrowski@...gle.com, qyousef@...alina.io,
tiozhang@...iglobal.com, elver@...gle.com,
linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
bpf@...r.kernel.org
Subject: Re: [RFC] Printk deadlock in bpf trace called from scheduler context
On Mon, Jul 29, 2024 at 01:46:09PM +0200, Radoslaw Zielonek wrote:
> I am currently working on a syzbot-reported bug where bpf
> is called from trace_sched_switch. In this scenario, we are still within
> the scheduler context, and calling printk can create a deadlock.
>
> I am uncertain about the best approach to fix this issue.
It's been like this forever, it doesn't need fixing, because tracepoints
shouldn't be doing printk() in the first place.
> Should we simply forbid such calls, or perhaps we should replace printk
> with printk_deferred in the bpf where we are still in scheduler context?
Not doing printk() is best.
Powered by blists - more mailing lists