Hello, I had written a very simple ioctl() method in a module; this ioctl calls copy_to_user(); I am getting EFAULT when trying to call this ioctl from use space. Any idea what can be the reason ? Here is the code: static unsigned long my_ioctl(struct inode* inode, struct file* file, unsigned int cmd, unsigned long data) { ... ... case MY_IOCTL: { unsigned int result = 99; if (copy_to_user((unsigned int *)data, &result, sizeof(unsigned int))) { printk("copy_to_user failed\n"); return -EFAULT; } } Regards, John -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/