diff options
author | Takashi Iwai <tiwai@suse.de> | 2022-10-11 09:01:47 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2022-10-11 09:02:43 +0200 |
commit | 97d917879d7f92df09c3f21fd54609a8bcd654b2 (patch) | |
tree | 99dd7e3590f0520dfb1aae4fa3d5ad05cb17c587 /security | |
parent | a70aef7982b012e86dfd39fbb235e76a21ae778a (diff) | |
download | linux-97d917879d7f92df09c3f21fd54609a8bcd654b2.tar.gz |
ALSA: oss: Fix potential deadlock at unregistration
We took sound_oss_mutex around the calls of unregister_sound_special()
at unregistering OSS devices. This may, however, lead to a deadlock,
because we manage the card release via the card's device object, and
the release may happen at unregister_sound_special() call -- which
will take sound_oss_mutex again in turn.
Although the deadlock might be fixed by relaxing the rawmidi mutex in
the previous commit, it's safer to move unregister_sound_special()
calls themselves out of the sound_oss_mutex, too. The call is
race-safe as the function has a spinlock protection by itself.
Link: https://lore.kernel.org/r/CAB7eexJP7w1B0mVgDF0dQ+gWor7UdkiwPczmL7pn91xx8xpzOA@mail.gmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20221011070147.7611-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions