# Re: \[PATCH v2\] tracing: Fix crash passing ERR\_PTR to kthread\_stop()

- From: Steven Rostedt \<rostedt@goodmis.org\>
- Date: 2026-08-17 13:26:46 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2026/08/17421834
- Thread: https://ratatoskr.run/sashiko-reviews/2026/08/17421834/t.md

```text
On Mon, 17 Aug 2026 12:15:32 +0000
sashiko-bot@kernel.org wrote:

> > diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> > index 0356cae0cf74e..9e941e5805f5e 100644
> > --- a/kernel/trace/trace_events.c
> > +++ b/kernel/trace/trace_events.c
> > @@ -3866,6 +3866,8 @@ static __init void event_test_stuff(void)
> >  	struct task_struct *test_thread;
> >  
> >  	test_thread = kthread_run(event_test_thread, NULL, "test-events");
> > +	if (WARN_ON(IS_ERR(test_thread)))
> > +		return;  
> 
> [Severity: High]
> Does this risk causing a console flood and soft lockup if thread creation
> persistently fails?
> 

If that happens than the system is doomed to begin with. We don't care
here. This patch is good enough. It's for a debugging feature, not
anything that would be run in production.

Just look at the name of the function: event_test_stuff()

This is where AI has a hard time with subtle requirements.

Thanks,

-- Steve
```
