Re: calling skb_queue_purge() causes oops when called from FreeS/WAN under 2.2.x

kuznet@ms2.inr.ac.ru
Tue, 26 Oct 1999 21:58:15 +0400 (MSK DST)


Hello!

> Can you quote the lines or tell me what version of the file you are

pfkey_v2.c, pfkey_upmsg():

if(!(skb = alloc_skb(pfkey_msg->sadb_msg_len, GFP_ATOMIC) )) {
return -ENOBUFS;
}

skb->h.raw = skb_put(skb, pfkey_msg->sadb_msg_len);
memcpy(skb->h.raw, pfkey_msg, pfkey_msg->sadb_msg_len * IPSEC_PFKEYv2_ALIGN);
^!!!!!!!!!

> choice if we are to continue to support more than one kernel version.

Look at ethernet drivers, f.e. drivers/net/tulip.c. They compile
for any kernel, including really ancient ones and contain not so
much of ifdefs. F.e. look at macro DEV_ALLOC_SKB(). You could use
the same approach. Now it is just unparsable.

Alexey

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