remarkable-linux/drivers/staging/line6
Stefan Hajnoczi 140e28b83c staging: line6: alloc/free buffers in hw_params/hw_free
It is unsafe to free buffers in line6_pcm_stop(), which is not allowed
to sleep, since urbs cannot be killed completely there and only
unlinked.  This means I/O may still be in progress and the URB
completion function still gets invoked.  This may result in memory
corruption when buffer_in is freed but I/O is still pending.

Additionally, line6_pcm_start() is not supposed to sleep so it should
not use kmalloc(GFP_KERNEL).

These issues can be resolved by performing buffer allocation/freeing in
the .hw_params/.hw_free callbacks instead.  The ALSA documentation also
recommends doing buffer allocation/freeing in these callbacks.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 16:14:12 -08:00
..
audio.c
audio.h
capture.c staging: line6: alloc/free buffers in hw_params/hw_free 2011-11-26 16:14:12 -08:00
capture.h
config.h
control.c
control.h
driver.c staging: line6: add Pod HD300 support 2011-11-26 16:14:11 -08:00
driver.h
dumprequest.c
dumprequest.h
Kconfig
Makefile staging: line6: add Pod HD300 support 2011-11-26 16:14:11 -08:00
midi.c staging: line6: add missing MIDI postprocessing case for POD HD300 2011-11-26 16:14:11 -08:00
midi.h
midibuf.c
midibuf.h
pcm.c staging: line6: alloc/free buffers in hw_params/hw_free 2011-11-26 16:14:12 -08:00
pcm.h
playback.c staging: line6: alloc/free buffers in hw_params/hw_free 2011-11-26 16:14:12 -08:00
playback.h
pod.c
pod.h
podhd.c staging: line6: add Pod HD300 support 2011-11-26 16:14:11 -08:00
podhd.h staging: line6: add Pod HD300 support 2011-11-26 16:14:11 -08:00
revision.h
toneport.c
toneport.h
usbdefs.h staging: line6: add Pod HD300 support 2011-11-26 16:14:11 -08:00
variax.c
variax.h