Skip to content

Commit f0654ba

Browse files
committed
Revert "ALSA: seq: Protect in-kernel ioctl calls with mutex"
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: syzbot+47ded6c0f23016cde310@syzkaller.appspotmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 5d704b0 commit f0654ba

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

‎sound/core/seq/seq_clientmgr.c‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2334,19 +2334,14 @@ int snd_seq_kernel_client_ctl(int clientid, unsigned int cmd, void *arg)
23342334
{
23352335
const struct ioctl_handler *handler;
23362336
struct snd_seq_client *client;
2337-
int err;
23382337

23392338
client = clientptr(clientid);
23402339
if (client == NULL)
23412340
return -ENXIO;
23422341

23432342
for (handler = ioctl_handlers; handler->cmd > 0; ++handler) {
2344-
if (handler->cmd == cmd) {
2345-
mutex_lock(&client->ioctl_mutex);
2346-
err = handler->func(client, arg);
2347-
mutex_unlock(&client->ioctl_mutex);
2348-
return err;
2349-
}
2343+
if (handler->cmd == cmd)
2344+
return handler->func(client, arg);
23502345
}
23512346

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

0 commit comments

Comments
 (0)