comedi_test: fix race when cancelling command
authorIan Abbott <abbotti@mev.co.uk>
Fri, 1 Feb 2013 14:03:23 +0000 (14:03 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Fri, 1 Feb 2013 14:03:23 +0000 (14:03 +0000)
commit81633a9b82b97e64cd5ee96da65acbec7d71f9dc
tree9ef2a9d7a7ad98fc208f4e43f295e6d7e753a58c
parent022eedf0cfa83fa0f3cc3b6d759d584594800d9e
comedi_test: fix race when cancelling command

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>
comedi/drivers/comedi_test.c