Skip to content
Commit c1f24841 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: usxy2: Fix potential doubly allocations

The PCM shmem pages are allocated in snd_usx2y_usbpcm_prepare().
Theoretically the prepare callback may be called simultaneously for
both playback and capture, hence this allocation can be racy.

Make sure that the allocation is performed exclusively by extending
the pcm_mutex lock to cover the allocation code, too.

Link: https://lore.kernel.org/r/20210517131545.27252-8-tiwai@suse.de


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 02d382af
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment