From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Abeni Subject: suspicius csum initialization in vmxnet3_rx_csum Date: Thu, 24 May 2018 10:47:21 +0200 Message-ID: <1527151641.3058.32.camel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, Neil Horman To: Ronak Doshi , Shrikrishna Khare , pv-drivers@vmware.com Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:56534 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965525AbeEXIrX (ORCPT ); Thu, 24 May 2018 04:47:23 -0400 Sender: netdev-owner@vger.kernel.org List-ID: Hi all, we are hitting the BUG() condition in skb_checksum_help() - skb_checksum_start_offset(skb) >= skb_headlen(skb) for skb received from vmnxnet3 and queued from OVS to user-space I think that the root cause is in vmxnet3_rx_csum(): if (gdesc->rcd.csum) { skb->csum = htons(gdesc->rcd.csum); skb->ip_summed = CHECKSUM_PARTIAL; CHECKSUM_PARTIAL looks suspicious here, as the csum field is initialized, instead of csum_offset/csum_start. To be honest I find also strange that the csum value is converted from host byte order. I'm wild guessing something like the below patch should fix the issue, but I'm not familiar with the vmxnet3 code. Can you please have a look? Thank you, Paolo --- diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 9ebe2a689966..06ade074c32c 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c @@ -1172,7 +1172,7 @@ vmxnet3_rx_csum(struct vmxnet3_adapter *adapter, } else { if (gdesc->rcd.csum) { skb->csum = htons(gdesc->rcd.csum); - skb->ip_summed = CHECKSUM_PARTIAL; + skb->ip_summed = CHECKSUM_COMPLETE; } else { skb_checksum_none_assert(skb); }