lkml.org 
[lkml]   [2003]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectcalling 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/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.045 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site