提交 be25fafb 编写于 作者: T Takashi Iwai 提交者: Xie XiuQi

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

[ Upstream commit f0654ba94e33699b295ce4f3dc73094db6209035 ]

This reverts commit feb689025fbb6f0aa6297d3ddf97de945ea4ad32.

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: feb689025fbb ("ALSA: seq: Protect in-kernel ioctl calls with mutex")
Reported-by: syzbot+47ded6c0f23016cde310@syzkaller.appspotmail.com
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 db835b96
...@@ -2337,19 +2337,14 @@ int snd_seq_kernel_client_ctl(int clientid, unsigned int cmd, void *arg) ...@@ -2337,19 +2337,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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册