<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 4, 2014 at 12:00 PM, Pranay Srivastava <span dir="ltr"><<a href="mailto:pranjas@gmail.com" target="_blank">pranjas@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><p><br>
On Mar 4, 2014 7:47 AM, "J.Hwan Kim" <<a href="mailto:kernel.frog.007@gmail.com" target="_blank">kernel.frog.007@gmail.com</a>> wrote:<br>
><br>
> Hi, everyone<br>
><br>
> When I use /proc file system in communicating between kernel and user space,<br>
> is the usage count of moudule automatically incremented or decremented?</p>
</div><p>I don't think so.</p><div class="">
<p>><br>
> I register proc file via create_proc_entry() and use .open, .close and<br>
> .mmap not using .read and .write function.<br>
><br>
> Please give me any hint..<br>
><br>
> Thanks in advance<br>
></p>
</div><p>You can do that by doing fops_get <br>
Or module_get.</p><div class=""><div class="h5">
<p>> Best Regards,<br>
><br>
> J.Hwan Kim<br>
><br>
><br>
> _______________________________________________<br>
> Kernelnewbies mailing list<br>
> <a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.org</a><br>
> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a></p>
</div></div><br>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div><br></div><div class="gmail_extra">This may help.<br><br><a href="http://stackoverflow.com/questions/448999/is-there-a-way-to-figure-out-what-is-using-a-linux-kernel-module">http://stackoverflow.com/questions/448999/is-there-a-way-to-figure-out-what-is-using-a-linux-kernel-module</a><br clear="all">
</div><div class="gmail_extra"><br>-- <br>Regards,<br>Rishi Agrawal<br>
</div></div>