ALSA: timer: Wrap with spinlock for queue access
authorTakashi Iwai <tiwai@suse.de>
Fri, 2 Jun 2017 15:35:30 +0000 (17:35 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 7 Jun 2017 08:25:53 +0000 (10:25 +0200)
commitd7f910bfedd863d13ea320030fe98e42d0938ed5
tree51ec98386371c6adead80f99ee88a42ccb6dbb19
parent890e2cb5d184629702a2c1a1e9631f9f64523c65
ALSA: timer: Wrap with spinlock for queue access

For accessing the snd_timer_user queue indices, we take tu->qlock.
But it's forgotten in a couple of places.

The one in snd_timer_user_params() should be safe without the
spinlock as the timer is already stopped.  But it's better for
consistency.

The one in poll is just a read-out, so it's not inevitably needed, but
it'd be good to make the result consistent, too.

Tested-by: Alexander Potapenko <glider@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/timer.c