- From: Dominik Kuhlen <werkstudent1.icmdti9_at_mch.siemens.de>
- Date: Tue, 6 Aug 2002 12:02:06 +0000
Hello !
I'm new to this list and to comedi.
Is it possible to crash the kernel with invalid commandarguments?
Here's the scenario:
After opening the "/dev/comedi0"
I try to read using
while ((r = read(comedi_fileno(ComediDevice), foobuf, 4096)) != 0 )
printf("Dumped : ret = %d data[0] = 0x%08x",r,foobuf[0]);
foobuf is: int foobuf[40960];
the command i send looks like this:
start : now 0
scan : timer 10000
convert: now 0
end : count 1
stop count 4000
comedi_command_test returns 0
comedi_command returns 0
this works.
if i pass :end count 4 and chanlist_len 4 this looks different:
if I repeat reading (3-4? times) the read() call blocks
and then the kernel is in some critical condition. Everything seems
to be ok, but if I try to start mc (midnightcommander) I sometimes
get a segfault.
remodprobing the ni_pcidio driver doesn't solve this problem.
And eventually the kernel hangs/reboots after a while.
Initial problem:
Here's what I'm trying to do :
I've got an external FIFO whose contents I would like to
read with the pcidio32. The REQ1 is connected to the
fifos readclock and A0-B7 are datalines.
Hence I have to do a pattern I/O using internally generated
clock. But how can I do this ?
The above mentioned read doesn't generate a clock
signal on the REQ1 line.
Comediversion : 0.7.65
Lib : 0.7.19
Debian linux kernel 2.4.17
Thanks
Dominik
Received on 2002-08-06Z11:02:06