linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Jia-Ju Bai <baijiaju1990@gmail.com>
Cc: gregkh@linuxfoundation.org, rafael@kernel.org,
	David Howells <dhowells@redhat.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linus.walleij@linaro.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] [Resend] Possible sleep-in-atomic-context bugs involving regmap_lock_mutex()
Date: Mon, 10 Sep 2018 18:41:04 +0100	[thread overview]
Message-ID: <20180910174104.GD10889@sirena.org.uk> (raw)
In-Reply-To: <9bcef57b-1a5c-cd16-8e44-932ef3be08cb@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 797 bytes --]

On Thu, Aug 30, 2018 at 10:34:20AM +0800, Jia-Ju Bai wrote:

> My static tool DSAC reports many sleep-in-atomic-context bugs involving
> regmap_lock_mutex(), so I wonder whether this function is possible to be
> executed in atomic context.

Have you actually analyzed the code paths that are really taken here?
Static tools really don't cope very well with the pluggable locking in
regmap.  If there are problems I'd suggest reporting them to the authors
of the drivers using them, it's not really anything to do with regmap if
they've messed up their locking.

> Here are some example bugs and their call paths in Linux-4.16 (from bottom
> to top, and [FUNC_PTR] means that there is a function pointer call):

That's quite old now...  not that this has been rapidly developed
recently but still.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-09-10 17:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-30  2:34 [BUG] [Resend] Possible sleep-in-atomic-context bugs involving regmap_lock_mutex() Jia-Ju Bai
2018-09-10 17:41 ` Mark Brown [this message]
2018-09-13  3:18   ` Jia-Ju Bai

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=20180910174104.GD10889@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=baijiaju1990@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dhowells@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=torvalds@linux-foundation.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 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).