netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* regression caused by 1d2024f61ec14bdb0c57a97a3fe73685abc2d198?
@ 2013-02-06 11:43 Michael S. Tsirkin
  2013-02-06 13:07 ` Eric Dumazet
  0 siblings, 1 reply; 16+ messages in thread
From: Michael S. Tsirkin @ 2013-02-06 11:43 UTC (permalink / raw)
  To: alexander.h.duyck, stephen.s.ko, jeffrey.t.kirsher, David Miller,
	netdev

It seems that starting with kernel 3.3 ixgbe sets gso_size for
incoming frames. It seems that this might result in gso_size
being set even when gso_type is 0.
This in turn leads to a crash at macvtap_skb_to_vnet_hdr
drivers/net/macvtap.c:628
which has this code:

       if (skb_is_gso(skb)) {
                struct skb_shared_info *sinfo = skb_shinfo(skb);

                /* This is a hint as to how much should be linear. */
                vnet_hdr->hdr_len = skb_headlen(skb);
                vnet_hdr->gso_size = sinfo->gso_size;
                if (sinfo->gso_type & SKB_GSO_TCPV4)
                        vnet_hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV4;
                else if (sinfo->gso_type & SKB_GSO_TCPV6)
                        vnet_hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV6;
                else if (sinfo->gso_type & SKB_GSO_UDP)
                        vnet_hdr->gso_type = VIRTIO_NET_HDR_GSO_UDP;
                else
                        BUG();
                if (sinfo->gso_type & SKB_GSO_TCP_ECN)
                        vnet_hdr->gso_type |= VIRTIO_NET_HDR_GSO_ECN;
        } else
                vnet_hdr->gso_type = VIRTIO_NET_HDR_GSO_NONE;


Since skb_is_gso tests gso_size.

What's the right way to handle this? Should skb_is_gso be
changed to test gso_type != 0?

-- 
MST

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-02-07  3:04 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-06 11:43 regression caused by 1d2024f61ec14bdb0c57a97a3fe73685abc2d198? Michael S. Tsirkin
2013-02-06 13:07 ` Eric Dumazet
2013-02-06 15:50   ` Michael S. Tsirkin
2013-02-06 16:15     ` Eric Dumazet
2013-02-06 17:42       ` Michael S. Tsirkin
2013-02-06 17:42         ` Eric Dumazet
2013-02-06 17:50           ` Michael S. Tsirkin
2013-02-06 18:05           ` Michael S. Tsirkin
2013-02-06 18:09             ` Eric Dumazet
2013-02-07  3:03         ` Cong Wang
2013-02-06 16:23     ` Eric Dumazet
2013-02-06 19:58     ` Ben Hutchings
2013-02-06 21:45       ` Michael S. Tsirkin
2013-02-06 21:55         ` Ben Hutchings
2013-02-06 22:26           ` Michael S. Tsirkin
2013-02-06 23:29             ` Ben Hutchings

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).