All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: bigeasy@linutronix.de
Cc: linux-perf-users@vger.kernel.org
Subject: [bug report] irq_work: Allow irq_work_sync() to sleep if irq_work() no IRQ support.
Date: Wed, 19 Jan 2022 16:37:29 +0300	[thread overview]
Message-ID: <20220119133729.GA14183@kili> (raw)

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


             reply	other threads:[~2022-01-19 13:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-19 13:37 Dan Carpenter [this message]
2022-01-26 12:11 ` [bug report] irq_work: Allow irq_work_sync() to sleep if irq_work() no IRQ support Sebastian Andrzej Siewior
2022-01-26 13:24   ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220119133729.GA14183@kili \
    --to=dan.carpenter@oracle.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-perf-users@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.