Hi all, sometimes I get an error message when removing a kernel module and the module cannot be unloaded. My application (kernel module using the internal timer, no IRQ) does nothing more than a matrix inversion. The task is started every 10ms and the time required for the matrix inversion is taken using rt_get_cpu_time_ns(). When unloading the kernel module, the median of the time consumption of all matrix inversions done is calculated and printed out by printk(). I'm using RTAI 1.3 with kernel 2.2.14 and the application works fine - for small matrices. At the beginning I declared the matrices as float[10][10] and matrix inversions with dimenstions up to 10 worked without problems. Then I declared the matrices as float[20][20], but still used only the lower 0-9 elements inverting matrices with a dimension of 10 and it still worked. When I try to invert a matrix with the dimension of 15, that means the matrix inversion runs in the matrix elements from [0..14], I can insmod my module and it works, but when rmmod-ing it, I get the following kernel messages: -- Jul 3 12:10:46 wema02 kernel: Unable to handle kernel paging request at virtual address 3dd53b00 Jul 3 12:10:46 wema02 kernel: current->tss.cr3 = 06178000, %cr3 = 06178000 Jul 3 12:10:46 wema02 kernel: *pde = 00000000 Jul 3 12:10:46 wema02 kernel: Oops: 0000 Jul 3 12:10:46 wema02 kernel: CPU: 0 Jul 3 12:10:46 wema02 kernel: EIP: 0010:[serial:__insmod_serial_S.bss_L10804+251954/42420507] Jul 3 12:10:46 wema02 kernel: EFLAGS: 00010086 Jul 3 12:10:47 wema02 kernel: eax: c3d50be0 ebx: c3d50bd4 ecx: 0000009f edx: c805d9a0 Jul 3 12:10:47 wema02 kernel: esi: c3d50be0 edi: 3dd53b00 ebp: c3fcfefc esp: c3fcfeec Jul 3 12:10:47 wema02 kernel: ds: 0018 es: 0018 ss: 0018 Jul 3 12:10:47 wema02 kernel: Process rmmod (pid: 637, process nr: 66, stackpage=c3fcf000) Jul 3 12:10:47 wema02 kernel: Stack: 00000246 c0113c29 c8062000 fffffff0 c3fcff6c c80595a0 c3d50be0 00000001 Jul 3 12:10:47 wema02 kernel: c0215d67 00000246 c8062000 fffffff0 c8062000 c8064bb4 c8064fe0 00000000 Jul 3 12:10:47 wema02 kernel: 00001d36 c8064bc4 c8065280 00003a6d 00001d36 c3c9dc80 c8062000 fffffff0 Jul 3 12:10:47 wema02 kernel: Call Trace: [unregister_console+37/64] [serial:__insmod_serial_S.bss_L10804+275392/42397069] [serial:__insmod_serial_S.bss_L10804+239968/42432493] [serial:__insmod_serial_S.bss_L10804+275392/42397069] [serial:__insmod_serial_S.bss_L10804+275392/42397069] [serial:__insmod_serial_S.bss_L10804+286580/42385881] [serial:__insmod_serial_S.bss_L10804+287648/42384813] Jul 3 12:10:47 wema02 kernel: [serial:__insmod_serial_S.bss_L10804+286596/42385865] [serial:__insmod_serial_S.bss_L10804+288320/42384141] [serial:__insmod_serial_S.bss_L10804+275392/42397069] [serial:__insmod_serial_S.bss_L10804+173951/42498510] [nfsd:__insmod_nfsd_O/lib/modules/2.2.14/fs/nfsd.o_M3B39C9F3_V131+-57344/76] [__free_pages+127/284] [get_module_symbol+28/140] [serial:__insmod_serial_S.bss_L10804+275392/42397069] Jul 3 12:10:47 wema02 kernel: [qm_symbols+189/380] [serial:__insmod_serial_S.bss_L10804+275392/42397069] [qm_symbols+127/380] [error_code+61/64] [system_call+56/64] Jul 3 12:10:47 wema02 kernel: Code: 3b 3f 0f 85 af 00 00 00 39 5e f8 0f 85 a6 00 00 00 f6 46 fc -- Tracing the unloading with some printk()-instructions I realized, that : - stop_rt_timer() ==> no error - rt_task_suspend(&Task1) ==> no error - rt_task_delete(&Task1) ==> error message, task is not deleted correctly What is wrong in my application? What is especially weird is, that *declaring* bigger matrices doesn't change the behavior of the task, but *using* a bigger part of the matrices makes the module producing errors when trying to remove it. Has anyone some ideas? Thanks in advance Arne Linder -- Dipl.-Ing. Arne Linder [EMAIL PROTECTED] Electrical Machines and Drives Wuppertal University Wuppertal - Germany -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] -- For more information on Real-Time Linux see: http://www.rtlinux.org/
