diff options
author | Takashi Iwai <tiwai@suse.de> | 2018-03-22 12:40:27 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-28 19:24:29 +0300 |
commit | 88079d335aac8c37e6ebdc142baab6ec34e27955 (patch) | |
tree | b1ec6bc618e1833058d86f9005c1b0fa9ebc367e /sound/pci | |
parent | 1fcbcfff716f8d495ec3790264bc3250c4b87e2f (diff) | |
download | linux-88079d335aac8c37e6ebdc142baab6ec34e27955.tar.xz |
ALSA: aloop: Fix access to not-yet-ready substream via cable
commit 8e6b1a72a75bb5067ccb6b56d8ca4aa3a300a64e upstream.
In loopback_open() and loopback_close(), we assign and release the
substream object to the corresponding cable in a racy way. It's
neither locked nor done in the right position. The open callback
assigns the substream before its preparation finishes, hence the other
side of the cable may pick it up, which may lead to the invalid memory
access.
This patch addresses these: move the assignment to the end of the open
callback, and wrap with cable->lock for avoiding concurrent accesses.
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/pci')
0 files changed, 0 insertions, 0 deletions