Messages in this thread | | | Date | Tue, 07 Oct 2003 13:33:33 -0700 | From | Vishwas Raman <> | Subject | calling devinet_ioctl from a kernel module |
| |
Hello all,
I'm experiencing a kernel panic in RedHat Linux 8.0 with 2.4.20 kernel when calling the function devinet_ioctl() with the SIOCSIFADDR command from within a kernel module. The function is called within the scope of userspace addressing in the following manner.
int res; mm_segment_t oldfs = get_fs(); set_fs(get_ds()); res = devinet_ioctl(cmd,arg); set_fs(oldfs);
This is how ipconfig.c illustrates how to use this function from within a kernel module, see ic_dev_ioctl() function in the source file.
When running in the scope of a kgdb patched kernel, I see the kernel panic when this function is called from within my kernel module. The panic happens because alloc_skb is being called non-atomically from an interrupt.
Is there anything grossly wrong that I am doing? Am I supposed to do something else before calling this function?
Thanks, Vishwas.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |