Messages in this thread | | | From | vgo@Ratio ... | Date | Fri, 12 Feb 1999 15:55:56 +0100 (MET) | Subject | kernel stack corruption |
| |
Every time when I use ioclt commands on my driver I get a "kernel stack corruption. Aiee". I set a breakpoint in exit.c at line 142 (using gdbstub and debugging with ddd) and printed the graphic of the task task_struct *p in a file which is attached to this mail.
-------------------------------------------------------------------- 139 REMOVE_LINKS(p); 140 release_thread(p); 141 if (STACK_MAGIC != *(unsigned long *)p->kernel_stack_page) 142 printk(KERN_ALERT "release: %s kernel stack corruption. Aiee\n" , p->comm); 143 free_kernel_stack(p->kernel_stack_page); 144 current->cmin_flt += p->min_flt + p->cmin_flt;
--------------------------------------------------------------------
Who can tell me why my p->kernel_stack_page isn't STACK_MAGIC?
in linux/kernel.h
#define STACK_MAGIC 0xdeadbeef
*(unsigned long *)p->kernel_stack_page = 0x2b;
By calling the ioctl the driver allocates thought vmalloc 111600 bytes of kernel space which is used until a new ioctl call. Is this the reason for the stack corruption? Has any memory who is allocated thought ioctl calls to be freed before returning the call?
Hope you can help me Vasili
---------------------------------- E-Mail: vgo@Ratio.de Date: 12-Feb-99 Time: 15:09:26
This message was sent by XFMail ---------------------------------- [unhandled content-type:application/postscript] | |