In waveform_ai_cancel(), replace the call to del_timer() with
del_timer_sync() to avoid a race condition between the timer routine
which may already be running on another CPU and the caller of the cancel
routine which is about to free various bits used by the timer routine
(such as async->cmd.chanlist).
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
static int waveform_ai_cancel(comedi_device * dev, comedi_subdevice * s)
{
devpriv->timer_running = 0;
- del_timer(&devpriv->timer);
+ del_timer_sync(&devpriv->timer);
return 0;
}