Re: creating procfs entries in netfilter context

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

 



On Fri, 2006-03-24 at 20:34 +0100, topi wrote:
> hi,
> 
> i'm trying to create a procfs entry with the create_proc_entry function
> in a netfilter hook (kernel 2.6.12), but i've got:
> 
> Debug: sleeping function called from invalid context at mm/slab.c:2093
> kernel: in_atomic():1, irqs_disabled():0
> kernel:  [__kmalloc+142/144] __kmalloc+0x8e/0x90
> [...]
> 
> because create_proc_entry invokes kmalloc with GFP_KERNEL
> 
> i need to create these entries without sleeping, GFP_ATOMIC, because in
> netfilter hooks is not allowed to sleep.


that's not enough ... because the VFS uses semaphores for just about
everything. And creating a proc entry needs to go to the vfs to do
things. I think that you're doing something really weird; proc entries
(which are deprecated btw!) are typically only created during
initialization not during normal runtime of a module....



--
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