lkml.org 
[lkml]   [2001]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectkernel panic because of route manipulation
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



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:01    [W:0.034 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site