On Thu, 2015-09-24 at 14:09 -0700, David Miller wrote: > From: Pravin B Shelar <pshe...@nicira.com> > Date: Tue, 22 Sep 2015 12:57:53 -0700 > > > VXLAN device can receive skb with checksum partial. But the checksum > > offset could be in outer header which is pulled on receive. This results > > in negative checksum offset for the skb. Such skb can cause the assert > > failure in skb_checksum_help(). Following patch fixes the bug by setting > > checksum-none while pulling outer header. > > > > Following is the kernel panic msg from old kernel hitting the bug. > ... > > Reported-by: Anupam Chanda <acha...@vmware.com> > > Signed-off-by: Pravin B Shelar <pshe...@nicira.com> > > Applied, thanks.
It looks like we also should clear skb->csum ? __skb_checksum_complete() definitely would be confused by garbage in skb->csum diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 6b6bd42d6134..43e6f6163e07 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -2799,8 +2799,10 @@ static inline void skb_postpull_rcsum(struct sk_buff *skb, if (skb->ip_summed == CHECKSUM_COMPLETE) skb->csum = csum_sub(skb->csum, csum_partial(start, len, 0)); else if (skb->ip_summed == CHECKSUM_PARTIAL && - skb_checksum_start_offset(skb) < 0) + skb_checksum_start_offset(skb) < 0) { skb->ip_summed = CHECKSUM_NONE; + skb->csum = 0; + } } unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len); -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html