`comedi_alloc_spriv()` allocates private storage for a comedi subdevice
and sets the `SRF_FREE_SPRIV` flag in the `runflags` member of the
subdevice to allow the private storage to be automatically freed when
the comedi device is being cleaned up. Unfortunately, the flag gets
clobbered by `do_cmd_
`do_cmd_ioctl()` is called with the comedi device's mutex locked to
process the `COMEDI_CMD` ioctl to set up comedi's asynchronous command
handling on a comedi subdevice. `comedi_read()` and `comedi_write()`
are the `read` and `write` handlers for the comedi device, but do not
lock the mutex (for
On Friday, July 05, 2013 8:30 AM, Ian Abbott wrote:
> `comedi_alloc_spriv()` allocates private storage for a comedi subdevice
> and sets the `SRF_FREE_SPRIV` flag in the `runflags` member of the
> subdevice to allow the private storage to be automatically freed when
> the comedi device is being cle