mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
Revert "ALSA: seq: Protect in-kernel ioctl calls with mutex"
[ Upstream commitf0654ba94e] This reverts commitfeb689025f. 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:feb689025f("ALSA: seq: Protect in-kernel ioctl calls with mutex") Reported-by: syzbot+47ded6c0f23016cde310@syzkaller.appspotmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
731ebeeda5
commit
eddfe9672e
@@ -2337,19 +2337,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",
|
||||
|
||||
Reference in New Issue
Block a user