diff options
author | Alex Shi <alex.shi@linaro.org> | 2018-01-24 12:02:09 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2018-01-24 12:02:09 +0800 |
commit | 4f0ca2b2718d297c88b1c303f2d414327c537636 (patch) | |
tree | 4b0a5fb992257e4441ca49576bef59e543678454 /sound/core/seq/seq_clientmgr.c | |
parent | 4729f0eeb703afefcb7c5030f05ca35c44146394 (diff) | |
parent | 79584a4221253611a4d033087f373b046350df9f (diff) |
Merge tag 'v4.9.78' into linux-linaro-lsk-v4.9
This is the 4.9.78 stable release
Diffstat (limited to 'sound/core/seq/seq_clientmgr.c')
-rw-r--r-- | sound/core/seq/seq_clientmgr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c index 45ef5915462c..16580a82e1c8 100644 --- a/sound/core/seq/seq_clientmgr.c +++ b/sound/core/seq/seq_clientmgr.c @@ -221,6 +221,7 @@ static struct snd_seq_client *seq_create_client1(int client_index, int poolsize) rwlock_init(&client->ports_lock); mutex_init(&client->ports_mutex); INIT_LIST_HEAD(&client->ports_list_head); + mutex_init(&client->ioctl_mutex); /* find free slot in the client table */ spin_lock_irqsave(&clients_lock, flags); @@ -2127,7 +2128,9 @@ static long snd_seq_ioctl(struct file *file, unsigned int cmd, return -EFAULT; } + mutex_lock(&client->ioctl_mutex); err = handler->func(client, &buf); + mutex_unlock(&client->ioctl_mutex); if (err >= 0) { /* Some commands includes a bug in 'dir' field. */ if (handler->cmd == SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT || |