OSDN Git Service

ALSA: vx: Fix possible transfer overflow
authorTakashi Iwai <tiwai@suse.de>
Wed, 4 Jan 2017 11:19:15 +0000 (12:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Nov 2017 08:21:20 +0000 (09:21 +0100)
commitfe21a3d688196522166686d628e2d8b3e22626e1
treeff71a37dc06e18089bfa9fa9491800e5c454d845
parent3b985d39ed4f1a6953c83b62221d2e7cf3509f31
ALSA: vx: Fix possible transfer overflow

[ Upstream commit 874e1f6fad9a5184b67f4cee37c1335cd2cc5677 ]

The pseudo DMA transfer codes in VX222 and VX-pocket driver have a
slight bug where they check the buffer boundary wrongly, and may
overflow.  Also, the zero sample count might be handled badly for the
playback (although it shouldn't happen in theory).  This patch
addresses these issues.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=141541
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/drivers/vx/vx_pcm.c
sound/pci/vx222/vx222_ops.c
sound/pcmcia/vx/vxp_ops.c