Women in Technology

Hear us Roar

  /dev/hello_world: A Simple Introduction to Device Drivers under Linux
Subject:   When insmod ./hello_world.ko, I receive "Segmentation Fault"
Date:   2007-07-06 13:10:35
From:   mvd
I'm using debian testing with kernel 2.6.18-4-686. I ran make in the printk version directory of the module. Here is the output:

make -C /lib/modules/2.6.18-4-686/build M=/home/joneill/downloads/hello_printk modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.18-4-686'
CC [M] /home/joneill/downloads/hello_printk/hello_printk.o
Building modules, stage 2.
CC /home/joneill/downloads/hello_printk/hello_printk.mod.o
LD [M] /home/joneill/downloads/hello_printk/hello_printk.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.18-4-686'

Then when running the command as root: insmod ./hello_printk.ko

I get the following error:

Segmentation fault

and the module does not load or print to dmesg.

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • When insmod ./hello_world.ko, I receive "Segmentation Fault"
    2007-07-06 13:44:19  valhenson [View]

    This most likely means that there is a mismatch between one of the following:

    * Your module utilities
    * Your running kernel
    * The kernel you compiled against

    Check the versions with

    $ insmod --version
    $ uname -r
    $ grep "o module-init-tools" /lib/modules/`uname -r`/build/Documentation/Changes