It is currently Sun Aug 25, 2019 9:54 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 12 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: panic in pppol2tp_xmit
PostPosted: Mon Feb 15, 2010 10:46 am 

Joined: Thu Oct 22, 2009 12:18 pm
Posts: 12
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 */
dst_release(skb->dst);
skb->dst = dst_clone(__sk_dst_get(sk_tun));
// NAF-10/2//2010 flush write
smp_mb();

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!


Top
 Profile  
 
 Post subject: Re: panic in pppol2tp_xmit
PostPosted: Tue May 18, 2010 7:19 am 

Joined: Tue May 18, 2010 7:14 am
Posts: 1
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group