[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <50b3b4c4-fe36-8c65-345b-f0a51193726c@gmail.com>
Date: Mon, 29 Jul 2019 11:54:07 +0800
From: Jia-Ju Bai <baijiaju1990@...il.com>
To: perex@...ex.cz, Takashi Iwai <tiwai@...e.de>,
gregkh@...uxfoundation.org, rfontana@...hat.com,
allison@...utok.net, tglx@...utronix.de
Cc: alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: [BUG] ALSA: core: seq: a possible double-lock bug in
snd_seq_midisynth_remove()
In snd_seq_midisynth_remove(), there is a possible double-lock bug:
snd_seq_midisynth_remove()
mutex_lock(®ister_mutex); -- line 421
snd_seq_delete_kernel_client() --- line 436
seq_free_client() -- line 2244
mutex_lock(®ister_mutex); -- line 294
This bug is found by a static analysis tool STCheck written by us.
I do not know how to correctly fix this bug, so I only report it.
A possible fix is to release the mutex lock before calling
seq_free_client() in snd_seq_delete_kernel_client() and then acquiring
the lock again after calling seq_free_client().
Best wishes,
Jia-Ju Bai
Powered by blists - more mailing lists