linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Removing a module even if use count is not zero
@ 2005-01-12  8:53 selvakumar nagendran
  2005-01-12 13:47 ` Brian Gerst
  2005-01-12 15:15 ` Chris Friesen
  0 siblings, 2 replies; 5+ messages in thread
From: selvakumar nagendran @ 2005-01-12  8:53 UTC (permalink / raw)
  To: linux-kernel

hello linux-experts,
    I inserted my module into the running kernel that
intercepts read system call. I am using kernel 2.4.28.
Now, I am unable to remove it since each and every
time, the module is used by some process. How can I
remove the module even if the usecount is not zero?
    Can anyone help me regarding this?

Thanks,
selva


		
__________________________________ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Removing a module even if use count is not zero
  2005-01-12  8:53 Removing a module even if use count is not zero selvakumar nagendran
@ 2005-01-12 13:47 ` Brian Gerst
  2005-01-12 15:15 ` Chris Friesen
  1 sibling, 0 replies; 5+ messages in thread
From: Brian Gerst @ 2005-01-12 13:47 UTC (permalink / raw)
  To: selvakumar nagendran; +Cc: linux-kernel

selvakumar nagendran wrote:
> hello linux-experts,
>     I inserted my module into the running kernel that
> intercepts read system call. I am using kernel 2.4.28.
> Now, I am unable to remove it since each and every
> time, the module is used by some process. How can I
> remove the module even if the usecount is not zero?
>     Can anyone help me regarding this?
> 
> Thanks,
> selva
> 

Reboot.  If you remove it, the system will likely crash.

--
				Brian Gerst

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Removing a module even if use count is not zero
  2005-01-12  8:53 Removing a module even if use count is not zero selvakumar nagendran
  2005-01-12 13:47 ` Brian Gerst
@ 2005-01-12 15:15 ` Chris Friesen
  2005-01-13  4:49   ` exporting /proc entry for module selvakumar nagendran
  1 sibling, 1 reply; 5+ messages in thread
From: Chris Friesen @ 2005-01-12 15:15 UTC (permalink / raw)
  To: selvakumar nagendran; +Cc: linux-kernel

selvakumar nagendran wrote:
> hello linux-experts,
>     I inserted my module into the running kernel that
> intercepts read system call. I am using kernel 2.4.28.
> Now, I am unable to remove it since each and every
> time, the module is used by some process. How can I
> remove the module even if the usecount is not zero?
>     Can anyone help me regarding this?

As already said, you need to reboot.

To fix this in the future, export a /proc entry that when written to 
causes your module to properly clean everything up and prevent anyone 
from getting new accesses.  This then allows you to remove the module 
cleanly.  Note that it may not be possible to cleanly deregister, 
depending on what your module is doing.

Chris

^ permalink raw reply	[flat|nested] 5+ messages in thread

* exporting /proc entry for module
  2005-01-12 15:15 ` Chris Friesen
@ 2005-01-13  4:49   ` selvakumar nagendran
  2005-01-13  4:54     ` Randy.Dunlap
  0 siblings, 1 reply; 5+ messages in thread
From: selvakumar nagendran @ 2005-01-13  4:49 UTC (permalink / raw)
  To: Chris Friesen; +Cc: linux-kernel

--- Chris Friesen <cfriesen@nortelnetworks.com> wrote:
> To fix this in the future, export a /proc entry that
> when written to 
> causes your module to properly clean everything up
> and prevent anyone 
> from getting new accesses.  This then allows you to
> remove the module 
> cleanly.  Note that it may not be possible to
> cleanly deregister, 
> depending on what your module is doing.
> 
> Chris

  How can I export a /proc entry for my module?

Regards,
selva


		
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: exporting /proc entry for module
  2005-01-13  4:49   ` exporting /proc entry for module selvakumar nagendran
@ 2005-01-13  4:54     ` Randy.Dunlap
  0 siblings, 0 replies; 5+ messages in thread
From: Randy.Dunlap @ 2005-01-13  4:54 UTC (permalink / raw)
  To: selvakumar nagendran; +Cc: Chris Friesen, linux-kernel

selvakumar nagendran wrote:
> --- Chris Friesen <cfriesen@nortelnetworks.com> wrote:
> 
>>To fix this in the future, export a /proc entry that
>>when written to 
>>causes your module to properly clean everything up
>>and prevent anyone 
>>from getting new accesses.  This then allows you to
>>remove the module 
>>cleanly.  Note that it may not be possible to
>>cleanly deregister, 
>>depending on what your module is doing.
>>
> 
>   How can I export a /proc entry for my module?

. . . . . . . . . .

You can study the valuable documents at
http://kernelnewbies.org/documents/

or google for other procfs example source code,
which should find several examples for you,
such as http://www.xenotime.net/linux/procfs_ex/

-- 
~Randy

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-01-13  5:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-12  8:53 Removing a module even if use count is not zero selvakumar nagendran
2005-01-12 13:47 ` Brian Gerst
2005-01-12 15:15 ` Chris Friesen
2005-01-13  4:49   ` exporting /proc entry for module selvakumar nagendran
2005-01-13  4:54     ` Randy.Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).