I have downloaded kernel 2.6.38-5 to add a system call.
I did the following steps:
1. I have added my system call to system call table
2. i have added the system cal number in
#define __NR_mycall 244
3. I have added the prototype to syscalls.h
asmlinkage long sys_mycall(long input);
4. here is my system call
asmlinkage long sys_mycall(long input)
return (input * 2);
5. I have edited the Makfiles too.
Now after compilation when i use it via syscall() it gives me "BAD ADDRESS" with errno set to 14.
What should i do?