cannot kmalloc nor vmalloc
maca02 at atlas.cz
Mon Jan 17 16:03:01 CET 2005
Hi, I'm just developing a new "match" (like ipt_limit for example) iptables module under RH FC 2, kernel 2.6.5-1.328.
If I make a request for about 100 kB of memory in the registered match function in my module by means of kmalloc(size, GPF_ATOMIC) and set it via memset() to zero, the computer freezes with kernel panic and debugging output. Maybe it has not enaugh memory. I tried something more and never got more than about 40 kB.
Then I tried to get more memory with the vmalloc() function. But vmalloc() is called with the GPF_KERNEL flag, so I cannot use it in the interrupt = I cannot use it in the match function. The vmalloc gives also the debugging output to the log, but it does not freezes the computer.
I also tried to get large amount of memory outside the match function - in the __init() of my module, and I was able to get more than 100 MB via vmalloc().
How can I get bigger chunk of memory in the interrupt? I will need more (about 5-10) chunks of 100 kB memory.
Any help will be very appreciated!
More information about the netfilter-devel