Was there any more information to why this bug happened?

Some reasons that would cause that is if the structure wasn't initialized correctly or got garbaged.

Did I submit the a version of the cocd code than that.one? I might have posted it as a test somewhere.

Jonathan

Henry Nestler wrote:
Hallo

colinux-serial-daemon.exe currently don't work.

Make a kernel panic if bytes received to linux.  Problem is inside macro list_add_tail.  The "prev" have wrong address "ecx: 6ce9211a".  Think the list_add_tail should work.  Only the address in list stored wrong from some other places before the interrupt calls here.

File: linux-2.6.11/drivers/char/cocd.c
Line: ~205
Function: cocd_interrupt

---
void cocd_interrupt(void)
{
        if (!cocd_driver)
                return;

        co_message_node_t *input;
        if(!co_get_message(&input, CO_DEVICE_SERIAL))
                return;
        if(!input)
                return;

        co_linux_message_t *message;
        struct tty_struct *tty;
        struct cocd_tty *cocd;
        message = (co_linux_message_t *)&input->msg.data;
        down(&cocd_sem);
        if (message->unit < CO_MODULE_MAX_SERIAL
         && (tty = cocd_driver->ttys[message->unit])
         && (cocd = (struct cocd_tty *)tty->driver_data)) {
                up(&cocd_sem);
                down(&cocd->sem);

===>  inside list_add_tail: "(&cocd->inq)->prev"  <=== wrong address

                list_add_tail(&input->node,&cocd->inq);
                up(&cocd->sem);
                wake_up(&cocd->waitq);
                return;
                }
        up(&cocd_sem);
        co_free_message(input);
}



ksymoops 2.4.11 on i686 2.6.11-co-0.6.3-rc1. Options used -v vmlinux (specified) -k /proc/ksyms (default) -l /proc/modules (default) -o /lib/modules/2.6.11-co-0.6.3-rc1/ (specified) -m vmlinux.map (specified) Error (regular_file): read_ksyms stat /proc/ksyms failed No modules in ksyms, skipping objects No ksyms, skipping lsmod Unable to handle kernel paging request at virtual address 6ce9211a c0211684 *pde = 00000000 Oops: 0002 [#1] CPU: 0 EIP: 0060:[<c0211684>] Not tainted VLI Using defaults from ksymoops -t elf32-i386 -a i386 EFLAGS: 00010016 (2.6.11-co-0.6.3-rc1) eax: ce4c82cc ebx: ce4c8280 ecx: 6ce9211a edx: ce62f9c0 esi: c0317f0c edi: 00000097 ebp: c0317f00 esp: c0317ef8 ds: 007b es: 007b ss: 0068 Stack: ce62f9c0 ce62f9c0 c0317f58 c010d208 ce62f9c0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ce62f9c0 00000202 00000000 Call Trace: [<c010369b>] show_stack+0x9b/0xb0 [<c01037eb>] show_registers+0x11b/0x190 [<c01039c4>] die+0xd4/0x170 [<c010e672>] do_page_fault+0x452/0x703 [<c01032db>] error_code+0x2b/0x30 [<c010d208>] co_handle_incoming_message+0x68/0xe0 [<c012d8ea>] co_handle_incoming_messages+0x6a/0xd0 [<c012d980>] co_idle_processor+0x30/0x70 [<c010048f>] cpu_idle+0x1f/0x60 [<c03187aa>] start_kernel+0x16a/0x1a0 [<c01001a9>] 0xc01001a9 [<c010cf65>] co_start+0x5/0x10 Code: 00 00 85 db 74 48 ff 05 c0 e0 2c c0 0f 8e d0 02 00 00 ff 0b 0f 88 d8 02 00 00 8d 43 4c 8b 55 f8 8b 48 04 89 50 04
EIP; c0211684 <cocd_interrupt+84/d0>   <=====
      

  
eax; ce4c82cc <__crc_transport_add_device+75160/121dca>
ebx; ce4c8280 <__crc_transport_add_device+75114/121dca>
ecx; 6ce9211a <__crc_blk_queue_hardsect_size+67e34/2b7d6c>
edx; ce62f9c0 <__crc_zlib_inflate_workspacesize+83771/26fc6b>
esi; c0317f0c <init_thread_union+1f0c/2000>
ebp; c0317f00 <init_thread_union+1f00/2000>
esp; c0317ef8 <init_thread_union+1ef8/2000>
      

Trace; c010369b <show_stack+9b/b0>
Trace; c01037eb <show_registers+11b/190>
Trace; c01039c4 <die+d4/170>
Trace; c010e672 <do_page_fault+452/703>
Trace; c01032db <error_code+2b/30>
Trace; c010d208 <co_handle_incoming_message+68/e0>
Trace; c012d8ea <co_handle_incoming_messages+6a/d0>
Trace; c012d980 <co_idle_processor+30/70>
Trace; c010048f <cpu_idle+1f/60>
Trace; c03187aa <start_kernel+16a/1a0>
Trace; c01001a9 <L6+0/2>
Trace; c010cf65 <co_start+5/10>

Code;  c0211684 <cocd_interrupt+84/d0>
00000000 <_EIP>:
Code;  c0211684 <cocd_interrupt+84/d0>   <=====
   0:   00 00                     add    %al,(%eax)   <=====
Code;  c0211686 <cocd_interrupt+86/d0>
   2:   85 db                     test   %ebx,%ebx
Code;  c0211688 <cocd_interrupt+88/d0>
   4:   74 48                     je     4e <_EIP+0x4e>
Code;  c021168a <cocd_interrupt+8a/d0>
   6:   ff 05 c0 e0 2c c0         incl   0xc02ce0c0
Code;  c0211690 <cocd_interrupt+90/d0>
   c:   0f 8e d0 02 00 00         jle    2e2 <_EIP+0x2e2>
Code;  c0211696 <cocd_interrupt+96/d0>
  12:   ff 0b                     decl   (%ebx)
Code;  c0211698 <cocd_interrupt+98/d0>
  14:   0f 88 d8 02 00 00         js     2f2 <_EIP+0x2f2>
Code;  c021169e <cocd_interrupt+9e/d0>
  1a:   8d 43 4c                  lea    0x4c(%ebx),%eax
Code;  c02116a1 <cocd_interrupt+a1/d0>
  1d:   8b 55 f8                  mov    0xfffffff8(%ebp),%edx
Code;  c02116a4 <cocd_interrupt+a4/d0>
  20:   8b 48 04                  mov    0x4(%eax),%ecx
Code;  c02116a7 <cocd_interrupt+a7/d0>
  23:   89 50 04                  mov    %edx,0x4(%eax)

 Kernel panic - not syncing: Attempted to kill the idle task!

1 error issued.  Results may not be reliable.
  

kjournald starting. Commit interval 5 seconds Unable to handle kernel paging request at virtual address 6ce9211a printing eip: c0211684 *pde = 00000000 Oops: 0002 [#1] PREEMPT Modules linked in: CPU: 0 EIP: 0060:[<c0211684>] Not tainted VLI EFLAGS: 00010016 (2.6.11-co-0.6.3-rc1) EIP is at cocd_interrupt+0x84/0xd0 eax: ce4c82cc ebx: ce4c8280 ecx: 6ce9211a edx: ce62f9c0 esi: c0317f0c edi: 00000097 ebp: c0317f00 esp: c0317ef8 ds: 007b es: 007b ss: 0068 Process swapper (pid: 0, threadinfo=c0316000 task=c02bdb20) Stack: ce62f9c0 ce62f9c0 c0317f58 c010d208 ce62f9c0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ce62f9c0 00000202 00000000 Call Trace: [<c010369b>] show_stack+0x9b/0xb0 [<c01037eb>] show_registers+0x11b/0x190 [<c01039c4>] die+0xd4/0x170 [<c010e672>] do_page_fault+0x452/0x703 [<c01032db>] error_code+0x2b/0x30 [<c010d208>] co_handle_incoming_message+0x68/0xe0 [<c012d8ea>] co_handle_incoming_messages+0x6a/0xd0 [<c012d980>] co_idle_processor+0x30/0x70 [<c010048f>] cpu_idle+0x1f/0x60 [<c03187aa>] start_kernel+0x16a/0x1a0 [<c01001a9>] 0xc01001a9 [<c010cf65>] co_start+0x5/0x10 Code: 00 00 85 db 74 48 ff 05 c0 e0 2c c0 0f 8e d0 02 00 00 ff 0b 0f 88 d8 02 00 00 8d 43 4c 8b 55 f8 8b 48 04 89 50 04 89 02 89 4a 04 <89> 11 ff 03 0f 8e c9 02 00 00 ba 03 00 00 00 8d 43 54 b9 01 00 Kernel panic - not syncing: Attempted to kill the idle task!