Hi all,
I need to create sk_buff packets in my driver and send it up to the
host that reads from a raw socket and does some processing. But when I
do this - the kernel "Oops" crashes. in fact, it's somewhere in the
free routines.
my code snippet is below
void fn(struct sk_buff ** sk)
{
.....
n = sizeof(assoc);
*sk = dev_alloc_skb(n + 1);
data = skb_put(*sk,n);
memcpy(data, &assoc,n);
(*sk)->len = n;
... <snip>
}
the function takes in a sk_buf **, assoc is a char buffer that needs
to be copied to the skb->data area.
I see that the skb construction is fine, it passes all the way up the
app routine, but then the kernel crashes (presumably in free routines,
I checked with ksymoops)
Anyone have an insight into what I could be doing wrong? am I missing
something? Answers greatly appreciated. Direct responses are better -
please mail to
n e c r o m o n g e r AT g m a i l DOT c o m. (I don't check the yahoo
acct - it's spam infested)
thanks much!
-m
|