comedi_fops: check s->async for read(), write() and poll() handlers
authorIan Abbott <abbotti@mev.co.uk>
Mon, 4 Feb 2013 13:33:06 +0000 (13:33 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Mon, 4 Feb 2013 13:33:06 +0000 (13:33 +0000)
commit595b57ae6c1f1ba7ffe8588ddfed62383023537f
tree1951e0f2bcc0e7f09e5baa83b9e9f09a58d69844
parent81633a9b82b97e64cd5ee96da65acbec7d71f9dc
comedi_fops: check s->async for read(), write() and poll() handlers

Some comedi drivers set dev->read_subdev or dev->write_subdev to a
subdevice that does not set asynchronous commands.  This can cause a
NULL pointer dereference in comedi_read(), comedi_write(), or
comedi_poll() when they try to dereference s->async.

Test to make sure s->async is non-NULL.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
comedi/comedi_fops.c