If you want to use a system call within a kernel module
then export the system call using EXPORT_SYMBOL macro.
A better solution would be to use mlock in the user space before entering the kernel (ie. write a wrapper function for your entry point that would lock pages in for you before it enters the kernel) This in my opinion is a cleaner solution than exporting sys_mlock. In addition since sys_mlock acts on the current process it might not have desirable effects in certain cases. Hope this helps balaji
|