On Thursday 14 October 2004 12:46, mohanlal jangir wrote: > p_kernel_data->p_len = > (int*) kmalloc(p_kernel_data->len, GFP_KERNEL); I think this assignment overwrites the user space pointer value. So, before kmalloc(), copy it to another local variable (say temp), and use that in place of 'p_usr_data->p_len' below, which even I think is not a right thing. > > copy_from_usr(p_kernel_data->p_len, > p_usr_data->p_len, p_kernel_data->len); > /* ^^^^^^^^^^^^^ */ -- Regards, Kiran Kumar Immidi -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/