From: Takashi Iwai <tiwai@suse.de>
To: Jia-Ju Bai <baijiaju1990@gmail.com>
Cc: perex@perex.cz, tiwai@suse.com, allison@lohutok.net,
rfontana@redhat.com, tglx@linutronix.de,
alsa-devel@alsa-project.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] ALSA: ice1712: a possible sleep-in-atomic-context bug in snd_vt1724_set_pro_rate()
Date: Wed, 18 Dec 2019 20:24:39 +0100 [thread overview]
Message-ID: <s5hh81xzbbc.wl-tiwai@suse.de> (raw)
In-Reply-To: <5d43135e-73b9-a46a-2155-9e91d0dcdf83@gmail.com>
On Wed, 18 Dec 2019 13:25:42 +0100,
Jia-Ju Bai wrote:
>
> The driver may sleep while holding a read lock.
> The function call path (from bottom to top) in Linux 4.19 is:
>
> sound/pci/ice1712/quartet.c, 414:
> mutex_lock in reg_write
> sound/pci/ice1712/quartet.c, 485:
> reg_write in set_cpld
> sound/pci/ice1712/quartet.c, 876:
> set_cpld in qtet_set_rate
> sound/pci/ice1712/ice1724.c, 687:
> (FUNC_PTR) qtet_set_rate in snd_vt1724_set_pro_rate
> sound/pci/ice1712/ice1724.c, 668:
> _raw_spin_lock_irqsave in snd_vt1724_set_pro_rate
>
> (FUNC_PTR) means a function pointer is called.
> mutex_lock() can sleep at runtime.
>
> I am not sure how to properly fix this possible bug, so I only report it.
>
> This bug is found by a static analysis tool STCheck written by myself.
Thanks for the report. I'll submitted the fix.
Takashi
prev parent reply other threads:[~2019-12-18 19:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 12:25 [BUG] ALSA: ice1712: a possible sleep-in-atomic-context bug in snd_vt1724_set_pro_rate() Jia-Ju Bai
2019-12-18 19:24 ` Takashi Iwai [this message]
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=s5hh81xzbbc.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=allison@lohutok.net \
--cc=alsa-devel@alsa-project.org \
--cc=baijiaju1990@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=rfontana@redhat.com \
--cc=tglx@linutronix.de \
--cc=tiwai@suse.com \
/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).