All of lore.kernel.org
 help / color / mirror / Atom feed
* GFP_KERNEL i checkentry
@ 2005-06-17 16:50 Joakim Axelsson
  2005-06-17 17:12 ` Tobias DiPasquale
  0 siblings, 1 reply; 5+ messages in thread
From: Joakim Axelsson @ 2005-06-17 16:50 UTC (permalink / raw)
  To: netfilter-devel

I have during my developing of some new modules be running into some
problem which I need help with. Since im running my routers on old
2.4.23-kernel i have been developing for it. However i will most probably
convert to 2.6 soon.

Anyway, in "ipt_checkentry" that is executed everytime a new rule is added
which uses the module (or acutally whenever ANY rule is changed, added or
removed) it would seem that the kernel (atleast 2.4) considers this to be
inside an interupt-handler. I guess this is the softinterupt syscall that
get/setsockopt() refers to. However, i was using GFP_KERNEL to allocate
memory here. This seems to be wrong and needs to be GTP_ATOMIC. In _very_
rare occations this will trigger the BUG() on line 1130 in mm/slab.c (in
kernel 2.4.23) whenever the general fiting slabs needs to be grown.

Now to the problem. As far as i can see, vanilla 2.6.11.9 has this problem
in ipt_SAME. Possbile ipt_connlimit and ipt_recent. However i don't think
proc fs punctions need to be GFP_ATOMIC. Possbily this problem exists in other
modules in patch-o-magic. I havn't had a time to check it. However, among
those patches i use from an about 1 year old pom in my 2.4.23 routing kernel
there are several occations of this.

Again, this is a very very rare bug to trigger. I had to load ALOT of
instances using iptables-restore of my module before the bug was triggered.

Question is: Should it really be GFP_ATOMIC in all of the modules hook
functions? 

Statement: Patch-o-magic possibly has alot of bugs with this that needs to
be checked.

-- 
/Joakim Axelsson A.K.A Gozem@EFnet

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-06-17 21:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-17 16:50 GFP_KERNEL i checkentry Joakim Axelsson
2005-06-17 17:12 ` Tobias DiPasquale
2005-06-17 18:29   ` Joakim Axelsson
2005-06-17 20:30     ` Joakim Axelsson
2005-06-17 21:56       ` Tobias DiPasquale

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.