diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-05-17 15:15:41 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-05-17 16:04:55 +0200 |
commit | c1f24841683f5ce902e49d35ba84abc3e3886427 (patch) | |
tree | 2222963d2a0c485326bdd402f5b5e19b9615a082 /sound/usb/usx2y/usX2Yhwdep.c | |
parent | ALSA: usx2y: Fix potential memory leaks (diff) | |
download | linux-c1f24841683f5ce902e49d35ba84abc3e3886427.tar.xz linux-c1f24841683f5ce902e49d35ba84abc3e3886427.zip |
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: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/usx2y/usX2Yhwdep.c')
0 files changed, 0 insertions, 0 deletions