lkml.org 
[lkml]   [2023]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tracing: Have all levels of checks prevent recursion
On Fri, 21 Jul 2023 18:06:07 +0200
Alexander Lobakin <aleksander.lobakin@intel.com> wrote:

> > Just because you disable interrupts does not mean you are in interrupt
> > context.
>
> Ah okay, thanks! IOW, if we want to check in some code that we're
> certainly have interrupts enabled and are not in the interrupt context,
> we must always do
>
> if (!(in_hardirq() || irqs_disabled()))
>

Yeah, probably.

> , nothing more elegant / already existing / ...?

It's not a common check. What would you call that?

irq_safe() ?

-- Steve

\
 
 \ /
  Last update: 2023-07-21 18:31    [W:0.090 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site