lkml.org 
[lkml]   [2019]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 8/8] ALSA: aloop: Support runtime change of snd_timer via info interface
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@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

\
 
 \ /
  Last update: 2019-11-07 09:06    [W:1.922 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site