summaryrefslogtreecommitdiff
path: root/lib/mpi/mpiutil.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2022-06-17 16:40:51 +0200
committerTakashi Iwai <tiwai@suse.de>2022-06-20 09:36:04 +0200
commit3809db6430bf6a725d234e6eec9a6f6be6b8c1ea (patch)
treefb9389ce3a0176649992bdde86080f5a218df71d /lib/mpi/mpiutil.c
parent463a20fd3481de33c2746f050b4e3f2e6db8017f (diff)
downloadlwn-3809db6430bf6a725d234e6eec9a6f6be6b8c1ea.tar.gz
lwn-3809db6430bf6a725d234e6eec9a6f6be6b8c1ea.zip
ALSA: rawmidi: Take buffer refcount while draining output
Although snd_rawmidi_drain_output() may take some long time, it has no protection and intrusive operations like the buffer resize may happen meanwhile. For making the operation a bit more robust, this patch takes the buffer refcount for blocking the buffer resize. Also, as this function is exported, in theory, it might be called asynchronously from the stream open/close state. For avoiding the missing refcount, now the close call checks the buffer refcount, too. Link: https://lore.kernel.org/r/20220617144051.18985-6-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions