Don't Forget "make clean"

Submitted by Eus
on June 10, 2008 - 1:02am

Just yesterday my friend and I were wondering why his Linux kernel module crashed the kernel in QEMU everytime the module was removed with rmmod; it caused the kernel to issue the BUG message on the screen before crashing. The kernel module itself had just been transfered from his host GNU/Linux operating system via scp. Examining the source code files together in QEMU did not reveal any problem. After trying several "printk() adding—makeinsmodrmmod—wondering" cycles in QEMU, I typed make clean before make. And, voila! It worked! It looked like that there were some left over from the previous module compilation on the host system.