]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ALSA: dummy: Disable switching timer backend via sysfs
authorTakashi Iwai <tiwai@suse.de>
Thu, 28 Jan 2016 06:54:16 +0000 (07:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Feb 2016 20:30:58 +0000 (12:30 -0800)
commitd0cc6515b1238f90c61b713160e94ff768b43325
tree6757a4492417e0c8678d112b46121d2a442ca6b2
parent1963ffef4a1a92a07773bf8a30ce1224dd861bd5
ALSA: dummy: Disable switching timer backend via sysfs

commit 7ee96216c31aabe1eb42fb91ff50dae9fcd014b2 upstream.

ALSA dummy driver can switch the timer backend between system timer
and hrtimer via its hrtimer module option.  This can be also switched
dynamically via sysfs, but it may lead to a memory corruption when
switching is done while a PCM stream is running; the stream instance
for the newly switched timer method tries to access the memory that
was allocated by another timer method although the sizes differ.

As the simplest fix, this patch just disables the switch via sysfs by
dropping the writable bit.

BugLink: http://lkml.kernel.org/r/CACT4Y+ZGEeEBntHW5WHn2GoeE0G_kRrCmUh6=dWyy-wfzvuJLg@mail.gmail.com
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/drivers/dummy.c