why i am getting kernel tainted message - Embedded

This is a discussion on why i am getting kernel tainted message - Embedded ; Hi All, I am new to this group as well as for linux operating system . So far i wrote only one linux driver for pci sdhost. now i am trying to make stack for that i wrote one bus ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: why i am getting kernel tainted message

  1. why i am getting kernel tainted message

    Hi All,
    I am new to this group as well as for linux operating
    system .

    So far i wrote only one linux driver for pci sdhost.

    now i am trying to make stack for that i wrote one bus driver and one
    host driver .

    when i am loading bus module its get loaded properly and i am able to
    see it in sys/bus folder.but when i am trying to register the host
    with bus i am getting kernel tainted message .

    can any one help me in removing this problem.

    i am using linux 2.6.21.fc7

    any kind of help will be appreciated.

    Regards

  2. Re: why i am getting kernel tainted message

    On Jan 27, 9:27 am, Nayan wrote:
    > Hi All,
    > I am new to this group as well as for linux operating
    > system .
    >
    > So far i wrote only one linux driver for pci sdhost.
    >
    > now i am trying to make stack for that i wrote one bus driver and one
    > host driver .
    >
    > when i am loading bus module its get loaded properly and i am able to
    > see it in sys/bus folder.but when i am trying to register the host
    > with bus i am getting kernel tainted message .
    >
    > can any one help me in removing this problem.
    >
    > i am using linux 2.6.21.fc7
    >
    > any kind of help will be appreciated.
    >
    > Regards


    do you use the MODULE_LICENSE("GNU") macro?

    --
    Gallon sylvestre
    http://devsyl.blogspot.com
    www.rathaxes.eu

  3. Re: why i am getting kernel tainted message

    do you use the MODULE_LICENSE("GNU") macro?
    Hi,
    Thanks for replying.

    I am using MODULE_LICENSE("Dual GPL/BSD");


    Regards

  4. Re: why i am getting kernel tainted message

    Nayan wrote:

    > I am using MODULE_LICENSE("Dual GPL/BSD");


    Which should not produce a tainted Kernel.

    Sven

    --
    "In the land of the brave and the free, we defend our freedom
    with the GNU GPL" (Richard M. Stallman on www.gnu.org)

    /me is giggls@ircnet, http://sven.gegg.us/ on the Web

  5. Re: why i am getting kernel tainted message

    Hi ,
    Soory for wrong information but i dont know weather it has any
    impact or not i am using the
    MODULE_LICENSE("Dual BSD/GPL");
    if it is wrong plz tell me what i am supposed to use here.

    following is the detailed output of compiling and loading the module

    My kernel version is as follows

    [root@localhost ~]# uname -r
    2.6.21-1.3194.fc7
    [root@localhost ~]#


    Following is the warning that i am getting wile compile the bus module

    [root@localhost sd_bus]# make

    make -C /lib/modules/2.6.21-1.3194.fc7/build SUBDIRS=/usr/src/Nayan/
    sd_stack/sd_bus modules

    make[1]: Entering directory `/usr/src/kernels/2.6.21-1.3194.fc7-i686'

    CC [M] /usr/src/Nayan/sd_stack/sd_bus/sdbus.o

    /usr/src/Nayan/sd_stack/sd_bus/sdbus.c: In function
    'show_sd_card_driver_version':


    Why the following warning is coming what is the reason and how to
    solve that
    i am not able to understand if you can give me some hint it would be
    very helpful.


    /usr/src/Nayan/sd_stack/sd_bus/sdbus.c:142: warning: ISO C90 forbids
    mixed declarations and code


    Building modules, stage 2.

    MODPOST 1 modules

    CC /usr/src/Nayan/sd_stack/sd_bus/sdbus.mod.o

    LD [M] /usr/src/Nayan/sd_stack/sd_bus/sdbus.ko

    make[1]: Leaving directory `/usr/src/kernels/2.6.21-1.3194.fc7-i686'


    following is the output of dmesg after loading the sdbus module.

    sd_bus_init--->

    <---sd_bus_init


    after loading the bus module if i am checking the weather kernel has
    been tainted or not by issung the following command result is 0 that
    means kernel has been tainted if i am not wrong then.

    [root@localhost sd_bus]# cat /proc/sys/kernel/tainted

    0







    following is te warning that i am getting while compiling the host
    module

    [root@localhost sd_host]# make

    make -C /lib/modules/2.6.21-1.3194.fc7/build SUBDIRS=/usr/src/Nayan/
    sd_stack/sd_host modules

    make[1]: Entering directory `/usr/src/kernels/2.6.21-1.3194.fc7-i686'

    CC [M] /usr/src/Nayan/sd_stack/sd_host/sdhost.o


    Why the following warning is coming what is the reason and how to
    solve that
    i am not able to understand if you can give me some hint it would be
    very helpful.

    I am gussing because of this i am getting the segmenation fault wen i
    try to double click over sdhost folder that gets created in sys/bus/
    sdbus/ after registering the host with sdbus.

    /usr/src/Nayan/sd_stack/sd_host/sdhost.c:68: warning: initialization
    from incompatible pointer type


    Building modules, stage 2.

    MODPOST 1 modules

    WARNING: "register_sd_host_device" [/usr/src/Nayan/sd_stack/sd_host/
    sdhost.ko] undefined!

    WARNING: "unregister_sd_host_device" [/usr/src/Nayan/sd_stack/sd_host/
    sdhost.ko] undefined!

    CC /usr/src/Nayan/sd_stack/sd_host/sdhost.mod.o

    LD [M] /usr/src/Nayan/sd_stack/sd_host/sdhost.ko

    make[1]: Leaving directory `/usr/src/kernels/2.6.21-1.3194.fc7-i686'

    [root@localhost sd_host]#




    following is the output of dmesg after loading the sdbus module.

    sd_bus_init--->

    <---sd_bus_init


    sd_bus_init--->

    <---sd_bus_init





    sdhost: no version for "unregister_sd_host_device" found: kernel
    tainted.

    sd_host_init--->

    register_sd_host_device--->





    BUS_ID:=SdHost

    Name:=SdHost



    <---register_sd_host_device





    device_create_file returned :0

    <---sd_host_init



    after loading the bus module if i am checking the weather kernel has
    been tainted or not by issung the following command result is 2 that
    means kernel has been tainted twice if i am not wrong then.

    [root@localhost sd_host]# cat /proc/sys/kernel/tainted

    2








    following is the result when i am trying to load the sdhost module
    indivisually after commenting the following two line.

    //register_sd_host_device(&pSdHost->sdhost);



    //iRet = device_create_file(&pSdHost-
    >sdhost.SdHostDevice,&dev_attr_sd_host_version);



    // unregister_sd_card_driver(&sd_mem_card);



    // device_remove_file(&pSdHost-
    >sdhost.SdHostDevice,&dev_attr_sd_host_version);



    [root@localhost sd_host]# make

    make -C /lib/modules/2.6.21-1.3194.fc7/build SUBDIRS=/usr/src/Nayan/
    sd_stack/sd_host modules

    make[1]: Entering directory `/usr/src/kernels/2.6.21-1.3194.fc7-i686'

    CC [M] /usr/src/Nayan/sd_stack/sd_host/sdhost.o

    /usr/src/Nayan/sd_stack/sd_host/sdhost.c:68: warning: initialization
    from incompatible pointer type

    /usr/src/Nayan/sd_stack/sd_host/sdhost.c:68: warning:
    'dev_attr_sd_host_version' defined but not used

    Building modules, stage 2.

    MODPOST 1 modules

    CC /usr/src/Nayan/sd_stack/sd_host/sdhost.mod.o

    LD [M] /usr/src/Nayan/sd_stack/sd_host/sdhost.ko

    make[1]: Leaving directory `/usr/src/kernels/2.6.21-1.3194.fc7-i686'

    [root@localhost sd_host]#

    [root@localhost sd_host]#

    [root@localhost sd_host]# cat /proc/sys/kernel/tainted

    0

    [root@localhost sd_host]# insmod sdhost.ko

    [root@localhost sd_host]# cat /proc/sys/kernel/tainted

    0

    [root@localhost sd_host]#



    following is the output after loading the sdhost module indivisually


    sd_host_init--->

    device_create_file returned :3

    <---sd_host_init

    [root@localhost sd_host]#


    if you people think without taking a look of the code its hard to
    figure out the problem plz give me your mail id i will send you the
    code.

    Regards


+ Reply to Thread