Re: proc sysctl entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2005-12-13 at 20:59 +0900, Adil Mujeeb wrote:
> Hi,
> I have developed a module which creates sysctl entry i.e.
> in /proc/sys/my_module/x .
> I have done this register_sysctl_table function during module
> initialiazation and clear the entry in module cleanup with
> unregister_sysctl_table function. Now my problem is if any user
> process has open the /proc/sys/my_module/x entry as  a file and trying
> to read its value and in the meantime root has removed the module. So
> it causes the kernel panic.
>  

you forgot to set the owner field, because if you did then the VFS will
keep a reference to your module, disallowing the rmmod...



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux