Skip to content

Commit

Permalink
Revert "ALSA: seq: Protect in-kernel ioctl calls with mutex"
Browse files Browse the repository at this point in the history
This reverts commit feb6890.

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: feb6890 ("ALSA: seq: Protect in-kernel ioctl calls with mutex")
Reported-by: [email protected]
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Apr 11, 2019
1 parent 5d704b0 commit f0654ba
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions sound/core/seq/seq_clientmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2334,19 +2334,14 @@ int snd_seq_kernel_client_ctl(int clientid, unsigned int cmd, void *arg)
{
const struct ioctl_handler *handler;
struct snd_seq_client *client;
int err;

client = clientptr(clientid);
if (client == NULL)
return -ENXIO;

for (handler = ioctl_handlers; handler->cmd > 0; ++handler) {
if (handler->cmd == cmd) {
mutex_lock(&client->ioctl_mutex);
err = handler->func(client, arg);
mutex_unlock(&client->ioctl_mutex);
return err;
}
if (handler->cmd == cmd)
return handler->func(client, arg);
}

pr_debug("ALSA: seq unknown ioctl() 0x%x (type='%c', number=0x%02x)\n",
Expand Down

0 comments on commit f0654ba

Please sign in to comment.