Re: module usage count

2014-03-04 Thread Rishi Agrawal
On Tue, Mar 4, 2014 at 12:00 PM, Pranay Srivastava wrote:

>
> On Mar 4, 2014 7:47 AM, "J.Hwan Kim"  wrote:
> >
> > Hi, everyone
> >
> > When I use /proc file system in communicating between kernel and user
> space,
> > is the usage count of moudule automatically incremented or decremented?
>
> I don't think so.
>
> >
> > I register proc file via create_proc_entry() and use .open, .close and
> > .mmap not using .read and .write function.
> >
> > Please give me any hint..
> >
> > Thanks in advance
> >
>
> You can do that by doing fops_get
> Or module_get.
>
> > Best Regards,
> >
> > J.Hwan Kim
> >
> >
> > ___
> > Kernelnewbies mailing list
> > Kernelnewbies@kernelnewbies.org
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
This may help.

http://stackoverflow.com/questions/448999/is-there-a-way-to-figure-out-what-is-using-a-linux-kernel-module

-- 
Regards,
Rishi Agrawal
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: module usage count

2014-03-03 Thread Pranay Srivastava
On Mar 4, 2014 7:47 AM, "J.Hwan Kim"  wrote:
>
> Hi, everyone
>
> When I use /proc file system in communicating between kernel and user
space,
> is the usage count of moudule automatically incremented or decremented?

I don't think so.

>
> I register proc file via create_proc_entry() and use .open, .close and
> .mmap not using .read and .write function.
>
> Please give me any hint..
>
> Thanks in advance
>

You can do that by doing fops_get
Or module_get.

> Best Regards,
>
> J.Hwan Kim
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


module usage count

2014-03-03 Thread J.Hwan Kim
Hi, everyone

When I use /proc file system in communicating between kernel and user space,
is the usage count of moudule automatically incremented or decremented?

I register proc file via create_proc_entry() and use .open, .close and
.mmap not using .read and .write function.

Please give me any hint..

Thanks in advance

Best Regards,

J.Hwan Kim


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies