Crash during a comedi call from a kernel module

Hello,

PLEASE HELP:

I'm trying to run an rtai/comedi module. The module compliles with no
problems but when I insmod it it crahes on the first comedilib API call
from the init_module routine. The next two commands are consecutive in my
init_module:

rt_printk("In init_comedi\n");
AnalogInputSubDevice = comedi_find_subdevice_by_type(COMEDI_DEVICE_MINOR, COMEDI_SUBD_AI,0);

By doing tail -f /var/log/messages I get the following:

----------------------------------------------------------
In init_comedi
Unable to handle kernel NULL pointer dereference at virtual address 00000028
Feb 18 13:56:38 Zakynthos kernel:  printing eip:
Feb 18 13:56:38 Zakynthos kernel: fca0c926
Feb 18 13:56:38 Zakynthos kernel: *pde = 00000000
Feb 18 13:56:38 Zakynthos kernel: Oops: 0000
Feb 18 13:56:38 Zakynthos kernel: CPU:    0
Feb 18 13:56:38 Zakynthos kernel: EIP:    0010:[<fca0c926>]    Tainted: P 
Feb 18 13:56:38 Zakynthos kernel: EFLAGS: 00010286
Feb 18 13:56:38 Zakynthos kernel: eax: 00000000   ebx: 00000000   ecx: 00000200   edx: 00000000
Feb 18 13:56:38 Zakynthos kernel: esi: 00000001   edi: 00000005   ebp: 0000a450   esp: f6851f0c
Feb 18 13:56:38 Zakynthos kernel: ds: 0018   es: 0018   ss: 0018
Feb 18 13:56:38 Zakynthos kernel: Process insmod (pid: 2010, stackpage=f6851000)
Feb 18 13:56:38 Zakynthos kernel: Stack: fca99000 00000005 fca9a2f9 00000000 00000001 00000000 fca9b883 fca991a0 
Feb 18 13:56:38 Zakynthos kernel:        fca99000 c011711d f6850000 00000000 00000515 bfffc8c8 000028c8 f6801000 
Feb 18 13:56:38 Zakynthos kernel:        00000060 f6802000 ffffffea 0000000a f6883780 00000060 fca0c000 fca99060 
Feb 18 13:56:38 Zakynthos kernel: Call Trace:    [<fca9a2f9>] [<fca9b883>] [<fca991a0>] [sys_init_module+1281/1444] [<fca99060>]
Feb 18 13:56:38 Zakynthos kernel: Call Trace:    [<fca9a2f9>] [<fca9b883>] [<fca991a0>] [<c011711d>] [<fca99060>]
Feb 18 13:56:38 Zakynthos kernel:   [system_call+51/56]
Feb 18 13:56:38 Zakynthos kernel:   [<c010877f>]
Feb 18 13:56:38 Zakynthos kernel: 
Feb 18 13:56:38 Zakynthos kernel: Code: 8b 53 28 39 d0 76 07 b8 ed ff ff ff eb 2d 39 d0 73 24 89 d1 
Feb 18 13:56:38 Zakynthos kernel:  DELETING AREA aaaa AT KERNEL REQUEST.
Feb 18 13:56:38 Zakynthos kernel: DELETING AREA bbbb AT KERNEL REQUEST.
Feb 18 13:57:43 Zakynthos ntpd[1110]: kernel time discipline status change 41

---------------------------------------------------------------------------------



I have a NI 6035e card configured for /dev/comedi0 which I've =
successfully tested with some of the (user space) demo programs provided with comedilib.
Info program works fine.

What did I do wrong?  How do I resolve this?

I'm using RTAI-24.1.10, Linux kernel 2.4.19, comedi-0.7.66, comedilib-0.7.19.

Thanks,

Nicolas

Received on 2003-02-18Z19:20:10