GSO segmentation in zero-copy mode is broken

Bug #1328973 reported by Anton Nayshtut
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

[SRU Justification]

[Setup]
 - 2 or more QEMU Guest VMs sharing the the same host
 - the Guests are communicating using virtio-net-pci devices
 - vhost-net is enabled

[Explanation]
If one Guest VM sends GSO packets to another while GRO is disabled for receiver, so these packets are segmented by net/core.
In this case, if zero-copy is enabled in vhost-net, the GSO packets TX completion is reported to userspace as before the TX is actually done.
The vhost-net's zero-copy mechanism is enabled by default since v3.8-rc1 (f9611c43).

[Impact]
Incorrect/junk data sent in case the transmitting Guest OS re-uses/frees the TX buffer immediately upon TX completion.

[Test Case]
Windows 2008R2 Guest VMs running MS HCK Offload LSO test.
NOTE1: GRO is always disabled in this case because it's not supported by Windows Guest virtio-net-pci drivers.
NOTE2: MS HCK re-uses the GSO (LSO) buffers, so it reproduces the issue every time.

[Note]
This bug has been fixed in v3.14-rc7 by 1fd819ec (https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=1fd819ecb90cc9b822cd84d3056ddba315d3340f).
The fix actually disables zero copy for this case since it forces unconditional fragments copying, but it resolves the issue mentioned.

Tags: saucy trusty
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1328973

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Dave Chiluk (chiluk) wrote :

Anton the kernel SRU process is special and is done using a mailing list

Please see
https://wiki.ubuntu.com/Kernel/Dev/StablePatchFormat
and
https://wiki.ubuntu.com/KernelTeam/KernelUpdates

Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: saucy trusty
Revision history for this message
Tim Gardner (timg-tpi) wrote :

Released with Ubuntu-3.13.0-22.44

Changed in linux (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Luis Henriques (henrix) wrote :

The linux-lts-saucy kernel 3.11.0-26.44~precise1 is now available in -proposed. It contains the following upstream commit, that fixes this bug:

commit 1fd819ecb90cc9b822cd84d3056ddba315d3340f
Author: Michael S. Tsirkin <email address hidden>
Date: Mon Mar 10 19:28:08 2014 +0200

    skbuff: skb_segment: orphan frags before copying

Revision history for this message
Anton Nayshtut (anton.nayshtut) wrote :

Verified by both me and Victor Tapia (vtapia) - with 3.11.0-26.44~precise1 kernel the MS HCK Offload LSO test passes.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.