Race conditions in comedi config?

What happens if, theoretically speaking, more than one kernel thread calls
comedi_device_attach() for the same board -- say as a result of two
processes doing a devconfig ioctl simultaneously?

I know this is a corner case.. but still.

I didn't notice any locking of comedi data structures during the
attach/configure phases of comedi operation... is this a red herring or am
I just missing something?

Also, is it possible for a device to be detached (ie kernel module
unloaded) right when another kernel thread is busy doing stuff inside of a
comedi device?

These issues keep me up at night... :)

-Calin

Received on 2003-07-03Z14:36:49