[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191217133045.GA3362771@kroah.com>
Date: Tue, 17 Dec 2019 14:30:45 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Jia-Ju Bai <baijiaju1990@...il.com>
Cc: perex@...ex.cz, tiwai@...e.com, rfontana@...hat.com,
allison@...utok.net, tglx@...utronix.de,
alsa-devel@...a-project.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [BUG] ALSA: seq: a possible sleep-in-atomic-context bug in
snd_virmidi_dev_receive_event()
On Tue, Dec 17, 2019 at 09:24:21PM +0800, 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/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.
Patches for this is usually best :)
Powered by blists - more mailing lists