linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bug report] irq_work: Allow irq_work_sync() to sleep if irq_work() no IRQ support.
@ 2022-01-19 13:37 Dan Carpenter
  2022-01-26 12:11 ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2022-01-19 13:37 UTC (permalink / raw)
  To: bigeasy; +Cc: linux-perf-users

Hello Sebastian Andrzej Siewior,

The patch 810979682ccc: "irq_work: Allow irq_work_sync() to sleep if
irq_work() no IRQ support." from Oct 6, 2021, leads to the following
Smatch static checker warning:

	kernel/events/core.c:4955 _free_event()
	warn: sleeping in atomic context

There are two potential call trees where preemption is disabled.

perf_remove_from_context() <- disables preempt
__perf_event_exit_context() <- disables preempt
-> __perf_remove_from_context()
   -> perf_group_detach()
      -> perf_put_aux_event()
         -> put_event()
            -> _free_event()

_free_event() calls irq_work_sync() which can now sleep.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-26 13:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-19 13:37 [bug report] irq_work: Allow irq_work_sync() to sleep if irq_work() no IRQ support Dan Carpenter
2022-01-26 12:11 ` Sebastian Andrzej Siewior
2022-01-26 13:24   ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).