LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   kernel panic (https://www.linuxquestions.org/questions/programming-9/kernel-panic-418613/)

vishalbutte 02-23-2006 12:10 AM

kernel panic
 
actually i tried to open user file in kernel mode i.e. at the booting of the the kernel i opened the file in sys_mount function.There i did compared the file type with ext3 and when it gets mounted i opened my file.
oldds=get_fs();
set_fs(get_ds());
file=filp_open("/vishal.txt",O_RDONLY,0);
if(file==NULL)
printk("Error");
else
printk("File opened");
filp_close(file,NULL);
set_fs(oldds);
I m getting kernel panic and its giving EIP is at filp_close.So can u tell me whats the problem in my code..
Thanks in advance....


All times are GMT -5. The time now is 06:35 AM.