summaryrefslogtreecommitdiffstats
path: root/sound/usb/usx2y/usX2Yhwdep.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-05-17 15:15:41 +0200
committerTakashi Iwai <tiwai@suse.de>2021-05-17 16:04:55 +0200
commitc1f24841683f5ce902e49d35ba84abc3e3886427 (patch)
tree2222963d2a0c485326bdd402f5b5e19b9615a082 /sound/usb/usx2y/usX2Yhwdep.c
parentALSA: usx2y: Fix potential memory leaks (diff)
downloadlinux-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