lkml.org 
[lkml]   [2011]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[37/90] ALSA: timer - Fix Oops at closing slave timer
    3.0-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Takashi Iwai <tiwai@suse.de>

    commit 0584ffa548b6e59aceb027112f23a55f0133400e upstream.

    A slave-timer instance has no timer reference, and this results in
    NULL-dereference at stopping the timer, typically called at closing
    the device.

    Reference: https://bugzilla.kernel.org/show_bug.cgi?id=40682

    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    sound/core/timer.c | 2 ++
    1 file changed, 2 insertions(+)

    --- a/sound/core/timer.c
    +++ b/sound/core/timer.c
    @@ -531,6 +531,8 @@ int snd_timer_stop(struct snd_timer_inst
    if (err < 0)
    return err;
    timer = timeri->timer;
    + if (!timer)
    + return -EINVAL;
    spin_lock_irqsave(&timer->lock, flags);
    timeri->cticks = timeri->ticks;
    timeri->pticks = 0;



    \
     
     \ /
      Last update: 2011-08-14 18:35    [W:4.165 / U:1.968 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site