projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'v3.10.108' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git]
/
sound
/
core
/
seq
/
seq_clientmgr.c
diff --git
a/sound/core/seq/seq_clientmgr.c
b/sound/core/seq/seq_clientmgr.c
index d449dde1bf50d5f27b9eeaeebdeaa91d38f9b107..7b5a7902b7a26110fd28e4c4a2031752af862db4 100644
(file)
--- a/
sound/core/seq/seq_clientmgr.c
+++ b/
sound/core/seq/seq_clientmgr.c
@@
-1248,6
+1248,7
@@
static int snd_seq_ioctl_create_port(struct snd_seq_client *client,
struct snd_seq_client_port *port;
struct snd_seq_port_info info;
struct snd_seq_port_callback *callback;
struct snd_seq_client_port *port;
struct snd_seq_port_info info;
struct snd_seq_port_callback *callback;
+ int port_idx;
if (copy_from_user(&info, arg, sizeof(info)))
return -EFAULT;
if (copy_from_user(&info, arg, sizeof(info)))
return -EFAULT;
@@
-1261,7
+1262,9
@@
static int snd_seq_ioctl_create_port(struct snd_seq_client *client,
return -ENOMEM;
if (client->type == USER_CLIENT && info.kernel) {
return -ENOMEM;
if (client->type == USER_CLIENT && info.kernel) {
- snd_seq_delete_port(client, port->addr.port);
+ port_idx = port->addr.port;
+ snd_seq_port_unlock(port);
+ snd_seq_delete_port(client, port_idx);
return -EINVAL;
}
if (client->type == KERNEL_CLIENT) {
return -EINVAL;
}
if (client->type == KERNEL_CLIENT) {
@@
-1283,6
+1286,7
@@
static int snd_seq_ioctl_create_port(struct snd_seq_client *client,
snd_seq_set_port_info(port, &info);
snd_seq_system_client_ev_port_start(port->addr.client, port->addr.port);
snd_seq_set_port_info(port, &info);
snd_seq_system_client_ev_port_start(port->addr.client, port->addr.port);
+ snd_seq_port_unlock(port);
if (copy_to_user(arg, &info, sizeof(info)))
return -EFAULT;
if (copy_to_user(arg, &info, sizeof(info)))
return -EFAULT;