Hi Could you please tell me how to set that?
BTW the proc entry has read permission to everyone.
Rgds,
Adil
On 12/13/05, Arjan van de Ven <arjan@xxxxxxxxxxxxx> wrote:
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...