aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/seq/seq_fifo.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-08-25 09:21:44 +0200
committerTakashi Iwai <tiwai@suse.de>2019-08-25 09:31:10 +0200
commit75545304eba6a3d282f923b96a466dc25a81e359 (patch)
tree0b05723013a1044e1518b8b2612fe6f4f1cd5135 /sound/core/seq/seq_fifo.h
parentALSA: usb-audio: Check mixer unit bitmap yet more strictly (diff)
downloadlinux-dev-75545304eba6a3d282f923b96a466dc25a81e359.tar.xz
linux-dev-75545304eba6a3d282f923b96a466dc25a81e359.zip
ALSA: seq: Fix potential concurrent access to the deleted pool
The input pool of a client might be deleted via the resize ioctl, the the access to it should be covered by the proper locks. Currently the only missing place is the call in snd_seq_ioctl_get_client_pool(), and this patch papers over it. Reported-by: syzbot+4a75454b9ca2777f35c7@syzkaller.appspotmail.com Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to '')
-rw-r--r--sound/core/seq/seq_fifo.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/core/seq/seq_fifo.h b/sound/core/seq/seq_fifo.h
index edc68743943d..b56a7b897c9c 100644
--- a/sound/core/seq/seq_fifo.h
+++ b/sound/core/seq/seq_fifo.h
@@ -53,5 +53,7 @@ int snd_seq_fifo_poll_wait(struct snd_seq_fifo *f, struct file *file, poll_table
/* resize pool in fifo */
int snd_seq_fifo_resize(struct snd_seq_fifo *f, int poolsize);
+/* get the number of unused cells safely */
+int snd_seq_fifo_unused_cells(struct snd_seq_fifo *f);
#endif