Commit f0654ba9 authored by Takashi Iwai's avatar Takashi Iwai

Revert "ALSA: seq: Protect in-kernel ioctl calls with mutex"

This reverts commit feb68902.

The fix attempt was incorrect, leading to the mutex deadlock through
the close of OSS sequencer client.  The proper fix needs more
consideration, so let's revert it now.

Fixes: feb68902 ("ALSA: seq: Protect in-kernel ioctl calls with mutex")
Reported-by: syzbot+47ded6c0f23016cde310@syzkaller.appspotmail.com
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 5d704b0d
...@@ -2334,19 +2334,14 @@ int snd_seq_kernel_client_ctl(int clientid, unsigned int cmd, void *arg) ...@@ -2334,19 +2334,14 @@ int snd_seq_kernel_client_ctl(int clientid, unsigned int cmd, void *arg)
{ {
const struct ioctl_handler *handler; const struct ioctl_handler *handler;
struct snd_seq_client *client; struct snd_seq_client *client;
int err;
client = clientptr(clientid); client = clientptr(clientid);
if (client == NULL) if (client == NULL)
return -ENXIO; return -ENXIO;
for (handler = ioctl_handlers; handler->cmd > 0; ++handler) { for (handler = ioctl_handlers; handler->cmd > 0; ++handler) {
if (handler->cmd == cmd) { if (handler->cmd == cmd)
mutex_lock(&client->ioctl_mutex); return handler->func(client, arg);
err = handler->func(client, arg);
mutex_unlock(&client->ioctl_mutex);
return err;
}
} }
pr_debug("ALSA: seq unknown ioctl() 0x%x (type='%c', number=0x%02x)\n", pr_debug("ALSA: seq unknown ioctl() 0x%x (type='%c', number=0x%02x)\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment