hi all ,<br>i followed the link and tried to add a system call in kernel-version 2.6.37 <br>here is the code :<br><br><br>#include<linux/linkage.h> <br>#include<linux/kernel.h><br>#include<linux/fs.h> //for getname<br>
#include<linux/err.h> //for PTR_ERR<br>asmlinkage int sys_hariohm(const char __user *filename) <br>{<br> char *tmp = getname(filename);<br> int fd=PTR_ERR(tmp);<br> if (!IS_ERR(tmp)) <br> {<br> printk("filename %s \n",tmp);<br>
putname(tmp);<br> return fd;<br> }<br> else<br> {<br> return 2;<br> }<br>}<br><br><br>the compilation process was silent (without any error).<br> but when i try to boot into the kernel having this system call , i get the errors like :<br>
<br>do_exit() ,do_group_exit() , syscall_init() error lines with some addresses.<br><br>can someone help me understand what is wrong with this code?<br><br>thanks in advance :)<br clear="all"><br>-- <br>........................<div>
<i>MOHIT VERMA</i></div><br>