From: Jia-Ju Bai <baijiaju1990@gmail.com>
To: perex@perex.cz, tiwai@suse.com, rfontana@redhat.com,
gregkh@linuxfoundation.org, allison@lohutok.net,
tglx@linutronix.de
Cc: alsa-devel@alsa-project.org, LKML <linux-kernel@vger.kernel.org>
Subject: [BUG] ALSA: seq: a possible sleep-in-atomic-context bug in snd_virmidi_dev_receive_event()
Date: Tue, 17 Dec 2019 21:24:21 +0800 [thread overview]
Message-ID: <db47108d-3967-6760-3de2-17bf60741bc2@gmail.com> (raw)
The driver may sleep while holding a read lock.
The function call path (from bottom to top) in Linux 4.19 is:
sound/core/seq/seq_memory.c, 96:
copy_from_user in snd_seq_dump_var_event
sound/core/seq/seq_virmidi.c, 97:
snd_seq_dump_var_event in snd_virmidi_dev_receive_event
sound/core/seq/seq_virmidi.c, 88:
_raw_read_lock in snd_virmidi_dev_receive_event
copy_from_user() 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.
Best wishes,
Jia-Ju Bai
next reply other threads:[~2019-12-17 13:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 13:24 Jia-Ju Bai [this message]
2019-12-17 13:30 ` Greg KH
2019-12-17 13:37 ` Takashi Iwai
2019-12-17 13:39 ` 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=db47108d-3967-6760-3de2-17bf60741bc2@gmail.com \
--to=baijiaju1990@gmail.com \
--cc=allison@lohutok.net \
--cc=alsa-devel@alsa-project.org \
--cc=gregkh@linuxfoundation.org \
--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
all inboxes | Powered by JetHome®