Re: [PATCH] tracing/timerlat: Check tlat_var for NULL in timerlat_fd_release

From: Steven Rostedt
Date: Wed Sep 04 2024 - 10:23:12 EST


On Tue, 3 Sep 2024 14:47:42 +0200
Tomas Glozar <tglozar@xxxxxxxxxx> wrote:

> I suggest using the workaround suggested in
> https://lore.kernel.org/linux-trace-kernel/20240823125426.404f2705@xxxxxxxxxxxxxxxxxx
> for the time being. Together with the patch that adds locks around
> stopping the threads
> (https://patchwork.kernel.org/project/linux-trace-kernel/patch/20240823102816.5e55753b@xxxxxxxxxxxxxxxxxx/),
> this should prevent the kernel panic at least until we have a solution
> for the race itself.

When running my tests, the second one would end up deadlocking and
triggering lockdep. I found a way to do basically the same thing with a
cpumask and no added locking. I'm currently testing it and will be sending
out a patch later today (if it passes the tests).

-- Steve