Module reference count - Linux

This is a discussion on Module reference count - Linux ; {accidentally, I've sent the following to the moderators of linux.kernel before - if you're reading it I'm really sorry for it} Hi all, I'm porting my char device from kernel 2.6 to 2.4, but to my surprise, the module reference ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Module reference count

  1. Module reference count

    {accidentally, I've sent the following to the moderators of
    linux.kernel before - if you're reading it I'm really sorry for it}

    Hi all,

    I'm porting my char device from kernel 2.6 to 2.4, but to my surprise,
    the module reference counting doesn't work (after opening the device
    lsmod shows 0 users).

    Well try_module_get(THIS_MODULE) works, but I don't think this is the
    way that ref count should be done.


    Any Suggestions?

  2. Re: Module reference count

    On Jan 27, 4:55 pm, Mapisto wrote:
    > {accidentally, I've sent the following to the moderators of
    > linux.kernel before - if you're reading it I'm really sorry for it}
    >
    > Hi all,
    >
    > I'm porting my char device from kernel 2.6 to 2.4, but to my surprise,
    > the module reference counting doesn't work (after opening the device
    > lsmod shows 0 users).
    >
    > Well try_module_get(THIS_MODULE) works, but I don't think this is the
    > way that ref count should be done.
    >
    > Any Suggestions?


    I'm porting from 2.4 to 2.6 of course.

  3. Re: Module reference count

    On Jan 27, 5:13 pm, Mapisto wrote:
    > On Jan 27, 4:55 pm, Mapisto wrote:
    >
    > > {accidentally, I've sent the following to the moderators of
    > > linux.kernel before - if you're reading it I'm really sorry for it}

    >
    > > Hi all,

    >
    > > I'm porting my char device from kernel 2.6 to 2.4, but to my surprise,
    > > the module reference counting doesn't work (after opening the device
    > > lsmod shows 0 users).

    >
    > > Well try_module_get(THIS_MODULE) works, but I don't think this is the
    > > way that ref count should be done.

    >
    > > Any Suggestions?

    >
    > I'm porting from 2.4 to 2.6 of course.


    Well, after some more intense reading, I found out that the 2.6 kernel
    use cdev interface - migrating to that seems to solve the problem.

+ Reply to Thread