[lkml]   [2019]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v7 1/4] ftrace: Implement fs notification for tracing_max_latency
On Thu, 3 Oct 2019 00:04:56 +0200
Viktor Rosendahl <> wrote:

> > Can fsnotify() be called from irq context? If so, why have the work
> > queue at all? Just do the work from the irq_work handler.
> >
> fsnotify() might sleep. It calls send_to_group(), which calls
> inotify_handle_event() through a function pointer.
> inotify_handle_event() calls kmalloc() without the GFP_ATOMIC flag.
> There might be other reasons as well but the above is one that I have
> seen a warning for, when enabling CONFIG_DEBUG_ATOMIC_SLEEP and trying
> to call fsnotify() from an atomic context.

Thanks for the context. I wonder if we should add a "might_sleep()" to
fsnotify() then.

-- Steve

 \ /
  Last update: 2019-10-03 00:51    [W:0.047 / U:12.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site