Kernel oops on integrating a module with obj-y option
I am using Fedora core 1. I am doing my project in the linux kernel 2.4.28. In my project, I am intercepting system calls. I am doing all these things from a module. Now, I installed this module with the main kernel and I found it working nice when I used 'modprobe' to load it.
Then I changed obj-m of my module to obj-y and then I compiled my module object file with the core kernel files like fs.o net.o kernel.o. So, my target kernel binary code contains my module. Then I booted my system. Now, the kernel oops sometimes and sometimes it prompts for checking the disk and opens the file system as a read only device.
To integrate my module, I created a new subdirectory under the kernel source directory named 'rsched' and I icreated my own makefile for that. The makefile contains the following lines
obj-y := rsched.o ( previously obj-m := rsched.o)
then I changed the following lines in the top level make file.
SUBDIRS := fs net kernel.... rsched
CORE_FILES := kernel/kernel.o fs/fs.o .... rsched/rsched.o
How can I rectify this error so that I can integrate my module with the main kernel image?