This is a note to let you know that I've just added the patch titled

    macvtap: Fix csum_start when VLAN tags are present

to the 3.17-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     macvtap-fix-csum_start-when-vlan-tags-are-present.patch
and it can be found in the queue-3.17 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 3ce9b20f1971690b8b3b620e735ec99431573b39 Mon Sep 17 00:00:00 2001
From: Herbert Xu <[email protected]>
Date: Mon, 3 Nov 2014 14:01:25 +0800
Subject: macvtap: Fix csum_start when VLAN tags are present

From: Herbert Xu <[email protected]>

commit 3ce9b20f1971690b8b3b620e735ec99431573b39 upstream.

When VLAN is in use in macvtap_put_user, we end up setting
csum_start to the wrong place.  The result is that the whoever
ends up doing the checksum setting will corrupt the packet instead
of writing the checksum to the expected location, usually this
means writing the checksum with an offset of -4.

This patch fixes this by adjusting csum_start when VLAN tags are
detected.

Fixes: f09e2249c4f5 ("macvtap: restore vlan header on user read")
Signed-off-by: Herbert Xu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>

---
 drivers/net/macvtap.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -629,6 +629,8 @@ static void macvtap_skb_to_vnet_hdr(cons
        if (skb->ip_summed == CHECKSUM_PARTIAL) {
                vnet_hdr->flags = VIRTIO_NET_HDR_F_NEEDS_CSUM;
                vnet_hdr->csum_start = skb_checksum_start_offset(skb);
+               if (vlan_tx_tag_present(skb))
+                       vnet_hdr->csum_start += VLAN_HLEN;
                vnet_hdr->csum_offset = skb->csum_offset;
        } else if (skb->ip_summed == CHECKSUM_UNNECESSARY) {
                vnet_hdr->flags = VIRTIO_NET_HDR_F_DATA_VALID;


Patches currently in stable-queue which might be from 
[email protected] are

queue-3.17/hwrng-pseries-port-to-new-read-api-and-fix-stack-corruption.patch
queue-3.17/crypto-caam-fix-missing-dma-unmap-on-error-path.patch
queue-3.17/crypto-qat-enforce-valid-numa-configuration.patch
queue-3.17/tun-fix-csum_start-with-vlan-acceleration.patch
queue-3.17/macvtap-fix-csum_start-when-vlan-tags-are-present.patch
queue-3.17/crypto-caam-remove-duplicated-sg-copy-functions.patch
queue-3.17/crypto-qat-prevent-dma-mapping-zero-length-assoc-data.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to