]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ALSA: aloop - add locking to timer access
authorOmair Mohammed Abdullah <omair.m.abdullah@linux.intel.com>
Sat, 29 Sep 2012 06:54:05 +0000 (12:24 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Oct 2012 20:38:51 +0000 (05:38 +0900)
commit4ca1a84f737e7f8166aed08ba87f5acc49120da9
tree4fd209afe6b372267dcfaccc0869d6d783c97dda
parentc3b9446604af20c426b37b8191d9d089b40f5899
ALSA: aloop - add locking to timer access

commit d4f1e48bd11e3df6a26811f7a1f06c4225d92f7d upstream.

When the loopback timer handler is running, calling del_timer() (for STOP
trigger) will not wait for the handler to complete before deactivating the
timer. The timer gets rescheduled in the handler as usual. Then a subsequent
START trigger will try to start the timer using add_timer() with a timer pending
leading to a kernel panic.

Serialize the calls to add_timer() and del_timer() using a spin lock to avoid
this.

Signed-off-by: Omair Mohammed Abdullah <omair.m.abdullah@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/drivers/aloop.c