ALSA: seq: Fix racy cell insertions during snd_seq_pool_done()
[pandora-kernel.git] / sound / core / seq / seq_clientmgr.c
index 08865dc..d449dde 100644 (file)
@@ -1909,6 +1909,7 @@ static int snd_seq_ioctl_set_client_pool(struct snd_seq_client *client,
             info.output_pool != client->pool->size)) {
                if (snd_seq_write_pool_allocated(client)) {
                        /* remove all existing cells */
+                       snd_seq_pool_mark_closing(client->pool);
                        snd_seq_queue_client_leave_cells(client->number);
                        snd_seq_pool_done(client->pool);
                }