* Reboot not calling module_exit of LKM
@ 2011-08-05 18:39 Ramesh.P
2011-08-05 19:06 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Ramesh.P @ 2011-08-05 18:39 UTC (permalink / raw)
To: kernelnewbies
Hi,
Good day!
When a system is rebooted, the loadable kernel modules 'module_exit'
functions are not called. I see this behavior in a custom kernel. My
questions are
a. Is this applicable in mainline/normal kernel too?
b. If yes, what are the reasons? (One reason may be, not to get into
new problems while cleaning up the module)
c. Is there anyway for the kernel module to know the system is getting
rebooted? (Apart from letting userspace to indicate the kernel
module).
Appreciate your help and apologize if this is already answered in this forum.
Thanks,
Ramesh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Reboot not calling module_exit of LKM
2011-08-05 18:39 Reboot not calling module_exit of LKM Ramesh.P
@ 2011-08-05 19:06 ` Greg KH
2011-08-05 22:59 ` Ramesh.P
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2011-08-05 19:06 UTC (permalink / raw)
To: kernelnewbies
On Fri, Aug 05, 2011 at 11:39:16AM -0700, Ramesh.P wrote:
> Hi,
>
> Good day!
>
> When a system is rebooted, the loadable kernel modules 'module_exit'
> functions are not called. I see this behavior in a custom kernel. My
> questions are
>
> a. Is this applicable in mainline/normal kernel too?
Yes.
> b. If yes, what are the reasons? (One reason may be, not to get into
> new problems while cleaning up the module)
You don't need to unload a module as the machine is about to be turned
off.
> c. Is there anyway for the kernel module to know the system is getting
> rebooted? (Apart from letting userspace to indicate the kernel
> module).
Yes, hook to the reboot notifier.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Reboot not calling module_exit of LKM
2011-08-05 19:06 ` Greg KH
@ 2011-08-05 22:59 ` Ramesh.P
0 siblings, 0 replies; 3+ messages in thread
From: Ramesh.P @ 2011-08-05 22:59 UTC (permalink / raw)
To: kernelnewbies
Thanks Greg. Appreciate your reply.
Regards,
Ramesh
On Fri, Aug 5, 2011 at 12:06 PM, Greg KH <greg@kroah.com> wrote:
> On Fri, Aug 05, 2011 at 11:39:16AM -0700, Ramesh.P wrote:
>> Hi,
>>
>> Good day!
>>
>> When a system is rebooted, the loadable kernel modules 'module_exit'
>> functions are not called. I see this behavior in a custom kernel. My
>> questions are
>>
>> a. Is this applicable in mainline/normal kernel too?
>
> Yes.
>
>> b. If yes, what are the reasons? (One reason may be, not to get into
>> new problems while cleaning up the module)
>
> You don't need to unload a module as the machine is about to be turned
> off.
>
>> c. Is there anyway for the kernel module to know the system is getting
>> rebooted? (Apart from letting userspace to indicate the kernel
>> module).
>
> Yes, hook to the reboot notifier.
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-05 22:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-05 18:39 Reboot not calling module_exit of LKM Ramesh.P
2011-08-05 19:06 ` Greg KH
2011-08-05 22:59 ` Ramesh.P
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.