]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ALSA: seq: Fix regression by incorrect ioctl_mutex usages
authorTakashi Iwai <tiwai@suse.de>
Mon, 19 Feb 2018 16:16:01 +0000 (17:16 +0100)
committerBrian Maly <brian.maly@oracle.com>
Tue, 11 Dec 2018 18:35:01 +0000 (13:35 -0500)
commit7806b57b7186cfa05ef2dce9964bc82900438adf
tree2556d140aee09c688733b405ebebe116c4766464
parent29bb49ff187584ea5dd3d1472bc5cfd78690fe6e
ALSA: seq: Fix regression by incorrect ioctl_mutex usages

This is the revised backport of the upstream commit
b3defb791b26ea0683a93a4f49c77ec45ec96f10

We had another backport (e.g. 623e5c8ae32b in 4.4.115), but it applies
the new mutex also to the code paths that are invoked via faked
kernel-to-kernel ioctls.  As reported recently, this leads to a
deadlock at suspend (or other scenarios triggering the kernel
sequencer client).

This patch addresses the issue by taking the mutex only in the code
paths invoked by user-space, just like the original fix patch does.

Reported-and-tested-by: Andres Bertens <abertensu@yahoo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Orabug: 29005188
CVE: CVE-2018-1000004

(cherry picked from commit 8e8992a93d66adb640631a6778a5110f01118202)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
sound/core/seq/seq_clientmgr.c