[alsa-devel] [PATCH v2 8/8] ALSA: aloop: Support runtime change of snd_timer via info interface

Takashi Iwai tiwai at suse.de
Thu Nov 7 09:06:26 CET 2019


On Tue, 05 Nov 2019 15:32:18 +0100,
Andrew Gabbasov wrote:
> 
> Show and change sound card timer source with read-write info
> file in proc filesystem. Initial string can still be set as
> module parameter.
> 
> The timer source string value can be changed at any time,
> but it is latched by PCM substream open callback (the first one
> for a particular cable). At this point it is actually used, that
> is the string is parsed, and the timer is looked up and opened.
> 
> The timer source is set for a loopback card (the same as initial
> setting by module parameter), but every cable uses the value,
> current at the moment of open.
> 
> Setting the value to empty string switches the timer to jiffies.
> 
> Signed-off-by: Andrew Gabbasov <andrew_gabbasov at mentor.com>

Unfortunately the whole code here are racy.  It may lead to a crash or
use-after-free easily.  Some locking is needed definitely.


thanks,

Takashi


More information about the Alsa-devel mailing list