WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [patch] linux-2.6.18.8-xen: ixgbe: memset size in netif_napi

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [patch] linux-2.6.18.8-xen: ixgbe: memset size in netif_napi_del()
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Tue, 18 Aug 2009 15:49:06 +1000
Cc: Mitch Williams <mitch.a.williams@xxxxxxxxx>
Delivery-date: Mon, 17 Aug 2009 22:49:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
By inspection the memset appears to be long as napi->poll_dev
is a struct net_device not a struct napi_struct.

Cc: Mitch Williams <mitch.a.williams@xxxxxxxxx>
Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

--- 

Compile tested only.

Index: linux-2.6.18-xen.hg/drivers/net/ixgbe/kcompat.h
===================================================================
--- linux-2.6.18-xen.hg.orig/drivers/net/ixgbe/kcompat.h        2009-08-18 
15:42:32.000000000 +1000
+++ linux-2.6.18-xen.hg/drivers/net/ixgbe/kcompat.h     2009-08-18 
15:43:32.000000000 +1000
@@ -1595,7 +1595,7 @@ extern int __kc_adapter_clean(struct net
        do { \
                WARN_ON(!test_bit(__LINK_STATE_RX_SCHED, 
&(_napi)->poll_dev.state)); \
                dev_put(&(_napi)->poll_dev); \
-               memset(&(_napi)->poll_dev, 0, sizeof(struct napi_struct));\
+               memset(&(_napi)->poll_dev, 0, sizeof((_napi)->poll_dev));\
        } while (0)
 #else /* DRIVER_IGB || DRIVER_IXGBE */
 #define netif_rx_complete(netdev, napi) netif_rx_complete(netdev)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [patch] linux-2.6.18.8-xen: ixgbe: memset size in netif_napi_del(), Simon Horman <=