netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* kernel newbie question on kernel panic
@ 2008-07-21 15:24 Filka Michal
  2008-07-21 16:07 ` Daniel Lezcano
  0 siblings, 1 reply; 2+ messages in thread
From: Filka Michal @ 2008-07-21 15:24 UTC (permalink / raw)
  To: netdev

Hi all,

I try to create my first kernel module.
I have following problem. I have a function rp ... interesting part
follows (just some initialization is ommited - nothing special - the
function is just a skeleton)

int rp( struct sk_buff ** skb)
{
	_filter_rule * rule = NULL;

...

	rule = placebo();
-->	if( rule == NULL)
		printk( KERN_DEBUG "null rule\n");
	return 1;
}

The rp is called (subsequently) in netfilter (prerouting) hook context,
so as far as I know it runs in a SoftIRQ.

The placebo function does nothing - just returns NULL. The problem is in
line selected (-->).Everything goes until I try to somehow access
returned value. The access raises kernel panic, seems that some page
fault happent. If I comment out the line bellow selected (the test), no
kernel panic happens.

Questions are:
- why the page fault happens (some trouble in memory usage, or so?)
- how to avoid it?

Thanks for any help
Michal Filka

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

end of thread, other threads:[~2008-07-21 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-21 15:24 kernel newbie question on kernel panic Filka Michal
2008-07-21 16:07 ` Daniel Lezcano

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