linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* kernel panic because of route manipulation
@ 2001-08-29 14:21 Csanad Szabo
  0 siblings, 0 replies; only message in thread
From: Csanad Szabo @ 2001-08-29 14:21 UTC (permalink / raw)
  To: Kernel; +Cc: Netfilter

Hi all,

I'm writing a kernel module that uses the netfilter framework to catch IP
packets upon which I want to manipulate the kernel routing table.

I use the ip_rt_ioctl (in: net/ipv4/fib_frontend.c) to manipulate the
routing table. I succeeded to manipulate it whenever my kernel module is
not registered to a netfilter hook.

Unfortunately, whenever my kernel module has registered a function to a
netfilter hook and I want to add/delete a valid routing entry it leads to
kernel panic. I found out that the function 'rtmsg_fib' (in: 
net/ipv4/fib_hash.c) calls 'alloc_skb' nonatomically (the kernel
error msg can be found in net/core/skbuff.c, lines 172-4) although the
arguments passed to alloc_skb, i.e., size and gfp_mask, are the same as in
those cases when the routing entry is taken successfully.

Is there any spinlock, semaphore or memory management operation which I
have forgotten to investigate? Or having a pointer to a packet I cannot
freely manipulate the routing table as in any other case? What can lead to
such a kernel panic?

I'm using the kernel 2.4.3 on an HP Omnibook 900 (i686). If anyone can
help me I'm willing to send him the kernel module and the list of
the changes (printk with KERN_ALERT) I made.

Regards,

	Csanad
--------------------------------------------------------------------------
Csanad Szabo, Ph.D. Student                    mail: csanad@wit.mht.bme.hu
Technical University of Budapest          Department of Telecommunications




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-08-29 14:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-29 14:21 kernel panic because of route manipulation Csanad Szabo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).