diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-08-08 12:24:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-15 18:31:36 -0700 |
commit | 9ef4ce3c5f9f8960ef347ad85a90ccb9e11fb482 (patch) | |
tree | 3714996296c92754d9e29d59c7f71ab863c2b97f /sound/core | |
parent | 4c1f50da71cc26a4074ec4b1cb748869a6279f39 (diff) | |
download | kernel-common-9ef4ce3c5f9f8960ef347ad85a90ccb9e11fb482.tar.gz kernel-common-9ef4ce3c5f9f8960ef347ad85a90ccb9e11fb482.tar.bz2 kernel-common-9ef4ce3c5f9f8960ef347ad85a90ccb9e11fb482.zip |
ALSA: timer - Fix Oops at closing slave timer
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>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/timer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c index 7c1cbf0a0dc4..950eed0c098e 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -531,6 +531,8 @@ int snd_timer_stop(struct snd_timer_instance *timeri) 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; |