Skip to contentSkip to conversation

netfront: adjust clearing of extras space

PATCH In review Jan Beulich 2 participants 2 messages Mar 7, 2007 – Mar 8, 2007 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netfront: adjust clearing of extras space

This fixes a latent bug if there will ever be a second kind of extra defined.

drivers/xen/netfront/netfront.c +1 -1
Index: head-2007-02-27/drivers/xen/netfront/netfront.c
===================================================================
@@ -1317,7 +1317,7 @@ static int netif_poll(struct net_device 
 	work_done = 0;
 	while ((i != rp) && (work_done < budget)) {
 		memcpy(rx, RING_GET_RESPONSE(&np->rx, i), sizeof(*rx));
-		memset(extras, 0, sizeof(extras));
+		memset(extras, 0, sizeof(rinfo.extras));
 
 		err = xennet_get_responses(np, &rinfo, rp, &tmpq,
 					   &pages_flipped);
#1 lore raw
Quoted 4 lines · Jan Beulich

This fixes a latent bug if there will ever be a second kind of extra defined.

Thanks for catching this!

This was a typo and it only ever worked by accident.

Cheers,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt