panic in pppol2tp_xmit
Page 2 of 2

Author:  neilf [ Mon Feb 15, 2010 10:46 am ]
Post subject:  Re: panic in pppol2tp_xmit

am trying my own fix, which should verify the write into skb->dst and check it's valid before usage

/* Get routing info from the tunnel socket */
skb->dst = dst_clone(__sk_dst_get(sk_tun));
// NAF-10/2//2010 flush write

pppol2tp_skb_set_owner_w(skb, sk_tun);

/* Calculate UDP checksum if configured to do so */
if (sk_tun->sk_no_check == UDP_CSUM_NOXMIT)
skb->ip_summed = CHECKSUM_NONE;
// NAF-10/2/2010 add check for valid skb->dst pointer
// else if (!(skb->dst->dev->features & NETIF_F_V4_CSUM)) {
else if ((skb->dst) && (skb->dst->dev) && (!(skb->dst->dev->features & NETIF_F_V4_CSUM))) {
skb->ip_summed = CHECKSUM_COMPLETE;
csum = skb_checksum(skb, 0, udp_len, 0);
uh->check = csum_tcpudp_magic(inet->saddr, inet->daddr,
udp_len, IPPROTO_UDP, csum);
if (uh->check == 0)
uh->check = CSUM_MANGLED_0;
} else {

I realise that the smp_mb() is very specific to my environment, but I wanted belt and braces for this operation!. I have used mb() instead of wmb() because it forces the write in x86 mode, while wmb() is compiled out.
The other change may have knock on effects that I'm not aware of, but seems to be the safest thing to do. The change in 2.6.31 of dst_release() makes this check enen more relevent!

Author:  nikicat [ Tue May 18, 2010 7:19 am ]
Post subject:  Re: panic in pppol2tp_xmit

Hi, I catch panic in the same function (pppol2tp_xmit) after 10 minutes of 15-20 mbit/s load throw l2tp.
# uname -a
Linux 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux

openl2tp 1.7-1

Is there any fix for it?

Page 2 of 2 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group