[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH ixgbe] Don't depend of skb->data for VMDq


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Mitch Williams <mitch.a.williams@xxxxxxxxx>
  • Date: Tue, 17 Feb 2009 16:24:35 -0800
  • Cc: steven.smith@xxxxxxxxxxxxx, joserenato.santos@xxxxxx
  • Delivery-date: Tue, 17 Feb 2009 16:25:06 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; b=BcuI4cbCduxiCl/+iDnDC3beTW2ElAlR0egGNY2PQCdVpNBk2FIhI3kSeZ9yaZJXrh wQb9bjB0DBKp1E2AdEtrOYZC0jYAags/GLpTH4LdidiF0aisHrCh0bdBzRqqH01SjJy8 mV7jQMqX+XXwZwfnNChDlLcBNfmuKFeXXDiTQ=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Occasionally, vmq_alloc_skb() will give us an skb with a nonzero but
bogus data pointer.  Dereferencing this pointer will then cause a
panic.

Although we really need to find out where these are coming from, this
patch will enable us to continue development and testing in the short
term.

Signed-off-by: Mitch Williams <mitch.a.williams@xxxxxxxxx>

(Patch is attached as well as inline due to email mangling issues.)

diff -urpN -X dontdiff b/drivers/net/ixgbe/ixgbe_main.c
linux-2.6.18.hg/drivers/net/ixgbe/ixgbe_main.c
--- b/drivers/net/ixgbe/ixgbe_main.c    2009-02-17 13:48:00.000000000 -0800
+++ linux-2.6.18.hg/drivers/net/ixgbe/ixgbe_main.c      2009-02-17
14:06:58.000000000 -0800
@@ -1144,7 +1144,8 @@ static bool ixgbe_clean_rx_irq(struct ix
                total_rx_bytes += skb->len;
                total_rx_packets++;
 #ifdef CONFIG_XEN_NETDEV2_VMQ
-               if (skb->data)
+               if (!((adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) &&
+                    rx_ring->queue_index))
 #endif
                        skb->protocol = eth_type_trans(skb, adapter->netdev);

Attachment: vmdq-bogus-skb-data.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.